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
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+2−1
@@ -50,7 +50,8 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) · 49 unmodified lines
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+1−1
@@ -631,7 +631,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type, · 630 unmodified lines
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+2−2
@@ -3547,7 +3547,7 @@ static void shmem_put_super(struct super_block *sb) · 3546 unmodified lines
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 = { · 205 unmodified lines
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);

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