Skip to content

Commit 7e30d2a

Browse files
author
Al Viro
committed
make shmem_fill_super() static
... have callers use shmem_mount() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent df02450 commit 7e30d2a

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎drivers/base/devtmpfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static struct dentry *dev_mount(struct file_system_type *fs_type, int flags,
7171
const char *dev_name, void *data)
7272
{
7373
#ifdef CONFIG_TMPFS
74-
return mount_nodev(fs_type, flags, data, shmem_fill_super);
74+
return shmem_mount(fs_type, flags, dev_name, data);
7575
#else
7676
return ramfs_mount(fs_type, flags, dev_name, data);
7777
#endif

‎include/linux/shmem_fs.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
5050
* Functions in mm/shmem.c called directly from elsewhere:
5151
*/
5252
extern int shmem_init(void);
53-
extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
53+
extern struct dentry *shmem_mount(struct file_system_type *fs_type,
54+
int flags, const char *dev_name, void *data);
5455
extern struct file *shmem_file_setup(const char *name,
5556
loff_t size, unsigned long flags);
5657
extern struct file *shmem_kernel_file_setup(const char *name, loff_t size,

‎init/do_mounts.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
631631
int flags, const char *dev_name, void *data)
632632
{
633633
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);
635635

636636
return ramfs_mount(fs_type, flags, dev_name, data);
637637
}

‎mm/shmem.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3547,7 +3547,7 @@ static void shmem_put_super(struct super_block *sb)
35473547
sb->s_fs_info = NULL;
35483548
}
35493549

3550-
int shmem_fill_super(struct super_block *sb, void *data, int silent)
3550+
static int shmem_fill_super(struct super_block *sb, void *data, int silent)
35513551
{
35523552
struct inode *inode;
35533553
struct shmem_sb_info *sbinfo;
@@ -3759,7 +3759,7 @@ static const struct vm_operations_struct shmem_vm_ops = {
37593759
#endif
37603760
};
37613761

3762-
static struct dentry *shmem_mount(struct file_system_type *fs_type,
3762+
struct dentry *shmem_mount(struct file_system_type *fs_type,
37633763
int flags, const char *dev_name, void *data)
37643764
{
37653765
return mount_nodev(fs_type, flags, data, shmem_fill_super);

0 commit comments

Comments
 (0)