History

make shmem_fill_super() static

... have callers use shmem_mount()

Al Viro committed 7 years ago

Commit 7e30d2a1 parent df024504 files · +6 −5Browse files

Unified · Split

4 files
  1. drivers/base/devtmpfs.c +1 −1
  2. include/linux/shmem_fs.h +2 −1
  3. init/do_mounts.c +1 −1
  4. mm/shmem.c +2 −2
drivers/base/devtmpfs.c+1−1
@@ -71,7 +71,7 @@ static struct dentry *dev_mount(struct file_system_type *fs_type, int flags, · 70 unmodified lines
71 const char *dev_name, void *data)71 const char *dev_name, void *data)
72{72{
73#ifdef CONFIG_TMPFS73#ifdef CONFIG_TMPFS
74 return mount_nodev(fs_type, flags, data, shmem_fill_super);74 return shmem_mount(fs_type, flags, dev_name, data);
75#else75#else
76 return ramfs_mount(fs_type, flags, dev_name, data);76 return ramfs_mount(fs_type, flags, dev_name, data);
77#endif77#endif
include/linux/shmem_fs.h+2−1
@@ -50,7 +50,8 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) · 49 unmodified lines
50 * Functions in mm/shmem.c called directly from elsewhere:50 * Functions in mm/shmem.c called directly from elsewhere:
51 */51 */
52extern int shmem_init(void);52extern int shmem_init(void);
53extern int shmem_fill_super(struct super_block *sb, void *data, int silent);53extern struct dentry *shmem_mount(struct file_system_type *fs_type,
54 int flags, const char *dev_name, void *data);
54extern struct file *shmem_file_setup(const char *name,55extern struct file *shmem_file_setup(const char *name,
55 loff_t size, unsigned long flags);56 loff_t size, unsigned long flags);
56extern struct file *shmem_kernel_file_setup(const char *name, loff_t size,57extern struct file *shmem_kernel_file_setup(const char *name, loff_t size,
init/do_mounts.c+1−1
@@ -631,7 +631,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type, · 630 unmodified lines
631 int flags, const char *dev_name, void *data)631 int flags, const char *dev_name, void *data)
632{632{
633 if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)633 if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)
634 return mount_nodev(fs_type, flags, data, shmem_fill_super);634 return shmem_mount(fs_type, flags, dev_name, data);
635 635
636 return ramfs_mount(fs_type, flags, dev_name, data);636 return ramfs_mount(fs_type, flags, dev_name, data);
637}637}
mm/shmem.c+2−2
@@ -3547,7 +3547,7 @@ static void shmem_put_super(struct super_block *sb) · 3546 unmodified lines
3547 sb->s_fs_info = NULL;3547 sb->s_fs_info = NULL;
3548}3548}
3549 3549
3550int shmem_fill_super(struct super_block *sb, void *data, int silent)3550static int shmem_fill_super(struct super_block *sb, void *data, int silent)
3551{3551{
3552 struct inode *inode;3552 struct inode *inode;
3553 struct shmem_sb_info *sbinfo;3553 struct shmem_sb_info *sbinfo;
@@ -3759,7 +3759,7 @@ static const struct vm_operations_struct shmem_vm_ops = { · 205 unmodified lines
3759#endif3759#endif
3760};3760};
3761 3761
3762static struct dentry *shmem_mount(struct file_system_type *fs_type,3762struct dentry *shmem_mount(struct file_system_type *fs_type,
3763 int flags, const char *dev_name, void *data)3763 int flags, const char *dev_name, void *data)
3764{3764{
3765 return mount_nodev(fs_type, flags, data, shmem_fill_super);3765 return mount_nodev(fs_type, flags, data, shmem_fill_super);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t