diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-24 17:48:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:28 -0400 |
commit | fc14f2fef682df677d64a145256dbd263df2aa7b (patch) | |
tree | 74f6b939fbad959a43c04ec646cd0adc8af5f53a | |
parent | 848b83a59b772b8f102bc5e3f1187c2fa5676959 (diff) |
convert get_sb_single() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 10 | ||||
-rw-r--r-- | arch/s390/hypfs/inode.c | 8 | ||||
-rw-r--r-- | drivers/base/devtmpfs.c | 18 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 14 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_fs.c | 14 | ||||
-rw-r--r-- | drivers/isdn/capi/capifs.c | 8 | ||||
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 9 | ||||
-rw-r--r-- | drivers/oprofile/oprofilefs.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/inode.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/f_fs.c | 14 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 10 | ||||
-rw-r--r-- | drivers/xen/xenfs/super.c | 8 | ||||
-rw-r--r-- | fs/binfmt_misc.c | 8 | ||||
-rw-r--r-- | fs/configfs/mount.c | 8 | ||||
-rw-r--r-- | fs/debugfs/inode.c | 8 | ||||
-rw-r--r-- | fs/devpts/inode.c | 32 | ||||
-rw-r--r-- | fs/fuse/control.c | 10 | ||||
-rw-r--r-- | fs/nfsd/nfsctl.c | 8 | ||||
-rw-r--r-- | fs/openpromfs/inode.c | 8 | ||||
-rw-r--r-- | fs/super.c | 25 | ||||
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 18 | ||||
-rw-r--r-- | security/inode.c | 8 | ||||
-rw-r--r-- | security/selinux/selinuxfs.c | 9 | ||||
-rw-r--r-- | security/smack/smackfs.c | 12 |
25 files changed, 147 insertions, 139 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 5dec408d6703..3532b92de983 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -798,17 +798,17 @@ spufs_fill_super(struct super_block *sb, void *data, int silent) | |||
798 | return spufs_create_root(sb, data); | 798 | return spufs_create_root(sb, data); |
799 | } | 799 | } |
800 | 800 | ||
801 | static int | 801 | static struct dentry * |
802 | spufs_get_sb(struct file_system_type *fstype, int flags, | 802 | spufs_mount(struct file_system_type *fstype, int flags, |
803 | const char *name, void *data, struct vfsmount *mnt) | 803 | const char *name, void *data) |
804 | { | 804 | { |
805 | return get_sb_single(fstype, flags, data, spufs_fill_super, mnt); | 805 | return mount_single(fstype, flags, data, spufs_fill_super); |
806 | } | 806 | } |
807 | 807 | ||
808 | static struct file_system_type spufs_type = { | 808 | static struct file_system_type spufs_type = { |
809 | .owner = THIS_MODULE, | 809 | .owner = THIS_MODULE, |
810 | .name = "spufs", | 810 | .name = "spufs", |
811 | .get_sb = spufs_get_sb, | 811 | .mount = spufs_mount, |
812 | .kill_sb = kill_litter_super, | 812 | .kill_sb = kill_litter_super, |
813 | }; | 813 | }; |
814 | 814 | ||
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index 74d98670be27..47cc446dab8f 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -316,10 +316,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent) | |||
316 | return 0; | 316 | return 0; |
317 | } | 317 | } |
318 | 318 | ||
319 | static int hypfs_get_super(struct file_system_type *fst, int flags, | 319 | static struct dentry *hypfs_mount(struct file_system_type *fst, int flags, |
320 | const char *devname, void *data, struct vfsmount *mnt) | 320 | const char *devname, void *data) |
321 | { | 321 | { |
322 | return get_sb_single(fst, flags, data, hypfs_fill_super, mnt); | 322 | return mount_single(fst, flags, data, hypfs_fill_super); |
323 | } | 323 | } |
324 | 324 | ||
325 | static void hypfs_kill_super(struct super_block *sb) | 325 | static void hypfs_kill_super(struct super_block *sb) |
@@ -455,7 +455,7 @@ static const struct file_operations hypfs_file_ops = { | |||
455 | static struct file_system_type hypfs_type = { | 455 | static struct file_system_type hypfs_type = { |
456 | .owner = THIS_MODULE, | 456 | .owner = THIS_MODULE, |
457 | .name = "s390_hypfs", | 457 | .name = "s390_hypfs", |
458 | .get_sb = hypfs_get_super, | 458 | .mount = hypfs_mount, |
459 | .kill_sb = hypfs_kill_super | 459 | .kill_sb = hypfs_kill_super |
460 | }; | 460 | }; |
461 | 461 | ||
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index af0600143d1c..82bbb5967aa9 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c | |||
@@ -29,33 +29,33 @@ | |||
29 | static struct vfsmount *dev_mnt; | 29 | static struct vfsmount *dev_mnt; |
30 | 30 | ||
31 | #if defined CONFIG_DEVTMPFS_MOUNT | 31 | #if defined CONFIG_DEVTMPFS_MOUNT |
32 | static int dev_mount = 1; | 32 | static int mount_dev = 1; |
33 | #else | 33 | #else |
34 | static int dev_mount; | 34 | static int mount_dev; |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | static DEFINE_MUTEX(dirlock); | 37 | static DEFINE_MUTEX(dirlock); |
38 | 38 | ||
39 | static int __init mount_param(char *str) | 39 | static int __init mount_param(char *str) |
40 | { | 40 | { |
41 | dev_mount = simple_strtoul(str, NULL, 0); | 41 | mount_dev = simple_strtoul(str, NULL, 0); |
42 | return 1; | 42 | return 1; |
43 | } | 43 | } |
44 | __setup("devtmpfs.mount=", mount_param); | 44 | __setup("devtmpfs.mount=", mount_param); |
45 | 45 | ||
46 | static int dev_get_sb(struct file_system_type *fs_type, int flags, | 46 | static struct dentry *dev_mount(struct file_system_type *fs_type, int flags, |
47 | const char *dev_name, void *data, struct vfsmount *mnt) | 47 | const char *dev_name, void *data) |
48 | { | 48 | { |
49 | #ifdef CONFIG_TMPFS | 49 | #ifdef CONFIG_TMPFS |
50 | return get_sb_single(fs_type, flags, data, shmem_fill_super, mnt); | 50 | return mount_single(fs_type, flags, data, shmem_fill_super); |
51 | #else | 51 | #else |
52 | return get_sb_single(fs_type, flags, data, ramfs_fill_super, mnt); | 52 | return mount_single(fs_type, flags, data, ramfs_fill_super); |
53 | #endif | 53 | #endif |
54 | } | 54 | } |
55 | 55 | ||
56 | static struct file_system_type dev_fs_type = { | 56 | static struct file_system_type dev_fs_type = { |
57 | .name = "devtmpfs", | 57 | .name = "devtmpfs", |
58 | .get_sb = dev_get_sb, | 58 | .mount = dev_mount, |
59 | .kill_sb = kill_litter_super, | 59 | .kill_sb = kill_litter_super, |
60 | }; | 60 | }; |
61 | 61 | ||
@@ -351,7 +351,7 @@ int devtmpfs_mount(const char *mntdir) | |||
351 | { | 351 | { |
352 | int err; | 352 | int err; |
353 | 353 | ||
354 | if (!dev_mount) | 354 | if (!mount_dev) |
355 | return 0; | 355 | return 0; |
356 | 356 | ||
357 | if (!dev_mnt) | 357 | if (!dev_mnt) |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 12d5bf76302c..8c8afc716b98 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -362,13 +362,13 @@ bail: | |||
362 | return ret; | 362 | return ret; |
363 | } | 363 | } |
364 | 364 | ||
365 | static int ipathfs_get_sb(struct file_system_type *fs_type, int flags, | 365 | static struct dentry *ipathfs_mount(struct file_system_type *fs_type, |
366 | const char *dev_name, void *data, struct vfsmount *mnt) | 366 | int flags, const char *dev_name, void *data) |
367 | { | 367 | { |
368 | int ret = get_sb_single(fs_type, flags, data, | 368 | struct dentry *ret; |
369 | ipathfs_fill_super, mnt); | 369 | ret = mount_single(fs_type, flags, data, ipathfs_fill_super); |
370 | if (ret >= 0) | 370 | if (!IS_ERR(ret)) |
371 | ipath_super = mnt->mnt_sb; | 371 | ipath_super = ret->d_sb; |
372 | return ret; | 372 | return ret; |
373 | } | 373 | } |
374 | 374 | ||
@@ -411,7 +411,7 @@ bail: | |||
411 | static struct file_system_type ipathfs_fs_type = { | 411 | static struct file_system_type ipathfs_fs_type = { |
412 | .owner = THIS_MODULE, | 412 | .owner = THIS_MODULE, |
413 | .name = "ipathfs", | 413 | .name = "ipathfs", |
414 | .get_sb = ipathfs_get_sb, | 414 | .mount = ipathfs_mount, |
415 | .kill_sb = ipathfs_kill_super, | 415 | .kill_sb = ipathfs_kill_super, |
416 | }; | 416 | }; |
417 | 417 | ||
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index 7e433d75c775..f99bddc01716 100644 --- a/drivers/infiniband/hw/qib/qib_fs.c +++ b/drivers/infiniband/hw/qib/qib_fs.c | |||
@@ -555,13 +555,13 @@ bail: | |||
555 | return ret; | 555 | return ret; |
556 | } | 556 | } |
557 | 557 | ||
558 | static int qibfs_get_sb(struct file_system_type *fs_type, int flags, | 558 | static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags, |
559 | const char *dev_name, void *data, struct vfsmount *mnt) | 559 | const char *dev_name, void *data) |
560 | { | 560 | { |
561 | int ret = get_sb_single(fs_type, flags, data, | 561 | struct dentry *ret; |
562 | qibfs_fill_super, mnt); | 562 | ret = mount_single(fs_type, flags, data, qibfs_fill_super); |
563 | if (ret >= 0) | 563 | if (!IS_ERR(ret)) |
564 | qib_super = mnt->mnt_sb; | 564 | qib_super = ret->d_sb; |
565 | return ret; | 565 | return ret; |
566 | } | 566 | } |
567 | 567 | ||
@@ -603,7 +603,7 @@ int qibfs_remove(struct qib_devdata *dd) | |||
603 | static struct file_system_type qibfs_fs_type = { | 603 | static struct file_system_type qibfs_fs_type = { |
604 | .owner = THIS_MODULE, | 604 | .owner = THIS_MODULE, |
605 | .name = "ipathfs", | 605 | .name = "ipathfs", |
606 | .get_sb = qibfs_get_sb, | 606 | .mount = qibfs_mount, |
607 | .kill_sb = qibfs_kill_super, | 607 | .kill_sb = qibfs_kill_super, |
608 | }; | 608 | }; |
609 | 609 | ||
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 2b83850997c3..b4faed7fe0d3 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c | |||
@@ -125,16 +125,16 @@ fail: | |||
125 | return -ENOMEM; | 125 | return -ENOMEM; |
126 | } | 126 | } |
127 | 127 | ||
128 | static int capifs_get_sb(struct file_system_type *fs_type, | 128 | static struct dentry *capifs_mount(struct file_system_type *fs_type, |
129 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 129 | int flags, const char *dev_name, void *data) |
130 | { | 130 | { |
131 | return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt); | 131 | return mount_single(fs_type, flags, data, capifs_fill_super); |
132 | } | 132 | } |
133 | 133 | ||
134 | static struct file_system_type capifs_fs_type = { | 134 | static struct file_system_type capifs_fs_type = { |
135 | .owner = THIS_MODULE, | 135 | .owner = THIS_MODULE, |
136 | .name = "capifs", | 136 | .name = "capifs", |
137 | .get_sb = capifs_get_sb, | 137 | .mount = capifs_mount, |
138 | .kill_sb = kill_anon_super, | 138 | .kill_sb = kill_anon_super, |
139 | }; | 139 | }; |
140 | 140 | ||
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index 0a53500636c9..d2d5d23416dd 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
@@ -91,11 +91,10 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root); | |||
91 | static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); | 91 | static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); |
92 | 92 | ||
93 | 93 | ||
94 | static int ibmasmfs_get_super(struct file_system_type *fst, | 94 | static struct dentry *ibmasmfs_mount(struct file_system_type *fst, |
95 | int flags, const char *name, void *data, | 95 | int flags, const char *name, void *data) |
96 | struct vfsmount *mnt) | ||
97 | { | 96 | { |
98 | return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt); | 97 | return mount_single(fst, flags, data, ibmasmfs_fill_super); |
99 | } | 98 | } |
100 | 99 | ||
101 | static const struct super_operations ibmasmfs_s_ops = { | 100 | static const struct super_operations ibmasmfs_s_ops = { |
@@ -108,7 +107,7 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations; | |||
108 | static struct file_system_type ibmasmfs_type = { | 107 | static struct file_system_type ibmasmfs_type = { |
109 | .owner = THIS_MODULE, | 108 | .owner = THIS_MODULE, |
110 | .name = "ibmasmfs", | 109 | .name = "ibmasmfs", |
111 | .get_sb = ibmasmfs_get_super, | 110 | .mount = ibmasmfs_mount, |
112 | .kill_sb = kill_litter_super, | 111 | .kill_sb = kill_litter_super, |
113 | }; | 112 | }; |
114 | 113 | ||
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index 449de59bf35b..e9ff6f7770be 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c | |||
@@ -259,17 +259,17 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | static int oprofilefs_get_sb(struct file_system_type *fs_type, | 262 | static struct dentry *oprofilefs_mount(struct file_system_type *fs_type, |
263 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 263 | int flags, const char *dev_name, void *data) |
264 | { | 264 | { |
265 | return get_sb_single(fs_type, flags, data, oprofilefs_fill_super, mnt); | 265 | return mount_single(fs_type, flags, data, oprofilefs_fill_super); |
266 | } | 266 | } |
267 | 267 | ||
268 | 268 | ||
269 | static struct file_system_type oprofilefs_type = { | 269 | static struct file_system_type oprofilefs_type = { |
270 | .owner = THIS_MODULE, | 270 | .owner = THIS_MODULE, |
271 | .name = "oprofilefs", | 271 | .name = "oprofilefs", |
272 | .get_sb = oprofilefs_get_sb, | 272 | .mount = oprofilefs_mount, |
273 | .kill_sb = kill_litter_super, | 273 | .kill_sb = kill_litter_super, |
274 | }; | 274 | }; |
275 | 275 | ||
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index e2f63c0ea09d..9819a4cc3b26 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -574,16 +574,16 @@ static void fs_remove_file (struct dentry *dentry) | |||
574 | 574 | ||
575 | /* --------------------------------------------------------------------- */ | 575 | /* --------------------------------------------------------------------- */ |
576 | 576 | ||
577 | static int usb_get_sb(struct file_system_type *fs_type, | 577 | static struct dentry *usb_mount(struct file_system_type *fs_type, |
578 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 578 | int flags, const char *dev_name, void *data) |
579 | { | 579 | { |
580 | return get_sb_single(fs_type, flags, data, usbfs_fill_super, mnt); | 580 | return mount_single(fs_type, flags, data, usbfs_fill_super); |
581 | } | 581 | } |
582 | 582 | ||
583 | static struct file_system_type usb_fs_type = { | 583 | static struct file_system_type usb_fs_type = { |
584 | .owner = THIS_MODULE, | 584 | .owner = THIS_MODULE, |
585 | .name = "usbfs", | 585 | .name = "usbfs", |
586 | .get_sb = usb_get_sb, | 586 | .mount = usb_mount, |
587 | .kill_sb = kill_litter_super, | 587 | .kill_sb = kill_litter_super, |
588 | }; | 588 | }; |
589 | 589 | ||
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index f276e9594f00..4a830df4fc31 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
@@ -1176,9 +1176,9 @@ invalid: | |||
1176 | 1176 | ||
1177 | /* "mount -t functionfs dev_name /dev/function" ends up here */ | 1177 | /* "mount -t functionfs dev_name /dev/function" ends up here */ |
1178 | 1178 | ||
1179 | static int | 1179 | static struct dentry * |
1180 | ffs_fs_get_sb(struct file_system_type *t, int flags, | 1180 | ffs_fs_mount(struct file_system_type *t, int flags, |
1181 | const char *dev_name, void *opts, struct vfsmount *mnt) | 1181 | const char *dev_name, void *opts) |
1182 | { | 1182 | { |
1183 | struct ffs_sb_fill_data data = { | 1183 | struct ffs_sb_fill_data data = { |
1184 | .perms = { | 1184 | .perms = { |
@@ -1194,14 +1194,14 @@ ffs_fs_get_sb(struct file_system_type *t, int flags, | |||
1194 | 1194 | ||
1195 | ret = functionfs_check_dev_callback(dev_name); | 1195 | ret = functionfs_check_dev_callback(dev_name); |
1196 | if (unlikely(ret < 0)) | 1196 | if (unlikely(ret < 0)) |
1197 | return ret; | 1197 | return ERR_PTR(ret); |
1198 | 1198 | ||
1199 | ret = ffs_fs_parse_opts(&data, opts); | 1199 | ret = ffs_fs_parse_opts(&data, opts); |
1200 | if (unlikely(ret < 0)) | 1200 | if (unlikely(ret < 0)) |
1201 | return ret; | 1201 | return ERR_PTR(ret); |
1202 | 1202 | ||
1203 | data.dev_name = dev_name; | 1203 | data.dev_name = dev_name; |
1204 | return get_sb_single(t, flags, &data, ffs_sb_fill, mnt); | 1204 | return mount_single(t, flags, &data, ffs_sb_fill); |
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | static void | 1207 | static void |
@@ -1220,7 +1220,7 @@ ffs_fs_kill_sb(struct super_block *sb) | |||
1220 | static struct file_system_type ffs_fs_type = { | 1220 | static struct file_system_type ffs_fs_type = { |
1221 | .owner = THIS_MODULE, | 1221 | .owner = THIS_MODULE, |
1222 | .name = "functionfs", | 1222 | .name = "functionfs", |
1223 | .get_sb = ffs_fs_get_sb, | 1223 | .mount = ffs_fs_mount, |
1224 | .kill_sb = ffs_fs_kill_sb, | 1224 | .kill_sb = ffs_fs_kill_sb, |
1225 | }; | 1225 | }; |
1226 | 1226 | ||
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index ba145e7fbe03..3ed73f49cf18 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -2097,11 +2097,11 @@ enomem0: | |||
2097 | } | 2097 | } |
2098 | 2098 | ||
2099 | /* "mount -t gadgetfs path /dev/gadget" ends up here */ | 2099 | /* "mount -t gadgetfs path /dev/gadget" ends up here */ |
2100 | static int | 2100 | static struct dentry * |
2101 | gadgetfs_get_sb (struct file_system_type *t, int flags, | 2101 | gadgetfs_mount (struct file_system_type *t, int flags, |
2102 | const char *path, void *opts, struct vfsmount *mnt) | 2102 | const char *path, void *opts) |
2103 | { | 2103 | { |
2104 | return get_sb_single (t, flags, opts, gadgetfs_fill_super, mnt); | 2104 | return mount_single (t, flags, opts, gadgetfs_fill_super); |
2105 | } | 2105 | } |
2106 | 2106 | ||
2107 | static void | 2107 | static void |
@@ -2119,7 +2119,7 @@ gadgetfs_kill_sb (struct super_block *sb) | |||
2119 | static struct file_system_type gadgetfs_type = { | 2119 | static struct file_system_type gadgetfs_type = { |
2120 | .owner = THIS_MODULE, | 2120 | .owner = THIS_MODULE, |
2121 | .name = shortname, | 2121 | .name = shortname, |
2122 | .get_sb = gadgetfs_get_sb, | 2122 | .mount = gadgetfs_mount, |
2123 | .kill_sb = gadgetfs_kill_sb, | 2123 | .kill_sb = gadgetfs_kill_sb, |
2124 | }; | 2124 | }; |
2125 | 2125 | ||
diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c index d6662b789b6b..f6339d11d59c 100644 --- a/drivers/xen/xenfs/super.c +++ b/drivers/xen/xenfs/super.c | |||
@@ -121,17 +121,17 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent) | |||
121 | return rc; | 121 | return rc; |
122 | } | 122 | } |
123 | 123 | ||
124 | static int xenfs_get_sb(struct file_system_type *fs_type, | 124 | static int xenfs_mount(struct file_system_type *fs_type, |
125 | int flags, const char *dev_name, | 125 | int flags, const char *dev_name, |
126 | void *data, struct vfsmount *mnt) | 126 | void *data) |
127 | { | 127 | { |
128 | return get_sb_single(fs_type, flags, data, xenfs_fill_super, mnt); | 128 | return mount_single(fs_type, flags, data, xenfs_fill_super); |
129 | } | 129 | } |
130 | 130 | ||
131 | static struct file_system_type xenfs_type = { | 131 | static struct file_system_type xenfs_type = { |
132 | .owner = THIS_MODULE, | 132 | .owner = THIS_MODULE, |
133 | .name = "xenfs", | 133 | .name = "xenfs", |
134 | .get_sb = xenfs_get_sb, | 134 | .mount = xenfs_mount, |
135 | .kill_sb = kill_litter_super, | 135 | .kill_sb = kill_litter_super, |
136 | }; | 136 | }; |
137 | 137 | ||
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 29990f0eee0c..1befe2ec8186 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -706,10 +706,10 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent) | |||
706 | return err; | 706 | return err; |
707 | } | 707 | } |
708 | 708 | ||
709 | static int bm_get_sb(struct file_system_type *fs_type, | 709 | static struct dentry *bm_mount(struct file_system_type *fs_type, |
710 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 710 | int flags, const char *dev_name, void *data) |
711 | { | 711 | { |
712 | return get_sb_single(fs_type, flags, data, bm_fill_super, mnt); | 712 | return mount_single(fs_type, flags, data, bm_fill_super); |
713 | } | 713 | } |
714 | 714 | ||
715 | static struct linux_binfmt misc_format = { | 715 | static struct linux_binfmt misc_format = { |
@@ -720,7 +720,7 @@ static struct linux_binfmt misc_format = { | |||
720 | static struct file_system_type bm_fs_type = { | 720 | static struct file_system_type bm_fs_type = { |
721 | .owner = THIS_MODULE, | 721 | .owner = THIS_MODULE, |
722 | .name = "binfmt_misc", | 722 | .name = "binfmt_misc", |
723 | .get_sb = bm_get_sb, | 723 | .mount = bm_mount, |
724 | .kill_sb = kill_litter_super, | 724 | .kill_sb = kill_litter_super, |
725 | }; | 725 | }; |
726 | 726 | ||
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 8c8d64230c2d..7d3607febe1c 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -104,16 +104,16 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent) | |||
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | static int configfs_get_sb(struct file_system_type *fs_type, | 107 | static struct dentry *configfs_do_mount(struct file_system_type *fs_type, |
108 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 108 | int flags, const char *dev_name, void *data) |
109 | { | 109 | { |
110 | return get_sb_single(fs_type, flags, data, configfs_fill_super, mnt); | 110 | return mount_single(fs_type, flags, data, configfs_fill_super); |
111 | } | 111 | } |
112 | 112 | ||
113 | static struct file_system_type configfs_fs_type = { | 113 | static struct file_system_type configfs_fs_type = { |
114 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
115 | .name = "configfs", | 115 | .name = "configfs", |
116 | .get_sb = configfs_get_sb, | 116 | .mount = configfs_do_mount, |
117 | .kill_sb = kill_litter_super, | 117 | .kill_sb = kill_litter_super, |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index a4ed8380e98a..37a8ca7c1222 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -135,17 +135,17 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent) | |||
135 | return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); | 135 | return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); |
136 | } | 136 | } |
137 | 137 | ||
138 | static int debug_get_sb(struct file_system_type *fs_type, | 138 | static struct dentry *debug_mount(struct file_system_type *fs_type, |
139 | int flags, const char *dev_name, | 139 | int flags, const char *dev_name, |
140 | void *data, struct vfsmount *mnt) | 140 | void *data) |
141 | { | 141 | { |
142 | return get_sb_single(fs_type, flags, data, debug_fill_super, mnt); | 142 | return mount_single(fs_type, flags, data, debug_fill_super); |
143 | } | 143 | } |
144 | 144 | ||
145 | static struct file_system_type debug_fs_type = { | 145 | static struct file_system_type debug_fs_type = { |
146 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
147 | .name = "debugfs", | 147 | .name = "debugfs", |
148 | .get_sb = debug_get_sb, | 148 | .mount = debug_mount, |
149 | .kill_sb = kill_litter_super, | 149 | .kill_sb = kill_litter_super, |
150 | }; | 150 | }; |
151 | 151 | ||
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 8b3ffd5b5235..1bb547c9cad6 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -331,7 +331,7 @@ static int compare_init_pts_sb(struct super_block *s, void *p) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | /* | 333 | /* |
334 | * devpts_get_sb() | 334 | * devpts_mount() |
335 | * | 335 | * |
336 | * If the '-o newinstance' mount option was specified, mount a new | 336 | * If the '-o newinstance' mount option was specified, mount a new |
337 | * (private) instance of devpts. PTYs created in this instance are | 337 | * (private) instance of devpts. PTYs created in this instance are |
@@ -345,20 +345,20 @@ static int compare_init_pts_sb(struct super_block *s, void *p) | |||
345 | * semantics in devpts while preserving backward compatibility of the | 345 | * semantics in devpts while preserving backward compatibility of the |
346 | * current 'single-namespace' semantics. i.e all mounts of devpts | 346 | * current 'single-namespace' semantics. i.e all mounts of devpts |
347 | * without the 'newinstance' mount option should bind to the initial | 347 | * without the 'newinstance' mount option should bind to the initial |
348 | * kernel mount, like get_sb_single(). | 348 | * kernel mount, like mount_single(). |
349 | * | 349 | * |
350 | * Mounts with 'newinstance' option create a new, private namespace. | 350 | * Mounts with 'newinstance' option create a new, private namespace. |
351 | * | 351 | * |
352 | * NOTE: | 352 | * NOTE: |
353 | * | 353 | * |
354 | * For single-mount semantics, devpts cannot use get_sb_single(), | 354 | * For single-mount semantics, devpts cannot use mount_single(), |
355 | * because get_sb_single()/sget() find and use the super-block from | 355 | * because mount_single()/sget() find and use the super-block from |
356 | * the most recent mount of devpts. But that recent mount may be a | 356 | * the most recent mount of devpts. But that recent mount may be a |
357 | * 'newinstance' mount and get_sb_single() would pick the newinstance | 357 | * 'newinstance' mount and mount_single() would pick the newinstance |
358 | * super-block instead of the initial super-block. | 358 | * super-block instead of the initial super-block. |
359 | */ | 359 | */ |
360 | static int devpts_get_sb(struct file_system_type *fs_type, | 360 | static struct dentry *devpts_mount(struct file_system_type *fs_type, |
361 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 361 | int flags, const char *dev_name, void *data) |
362 | { | 362 | { |
363 | int error; | 363 | int error; |
364 | struct pts_mount_opts opts; | 364 | struct pts_mount_opts opts; |
@@ -366,7 +366,7 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
366 | 366 | ||
367 | error = parse_mount_options(data, PARSE_MOUNT, &opts); | 367 | error = parse_mount_options(data, PARSE_MOUNT, &opts); |
368 | if (error) | 368 | if (error) |
369 | return error; | 369 | return ERR_PTR(error); |
370 | 370 | ||
371 | if (opts.newinstance) | 371 | if (opts.newinstance) |
372 | s = sget(fs_type, NULL, set_anon_super, NULL); | 372 | s = sget(fs_type, NULL, set_anon_super, NULL); |
@@ -374,7 +374,7 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
374 | s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); | 374 | s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); |
375 | 375 | ||
376 | if (IS_ERR(s)) | 376 | if (IS_ERR(s)) |
377 | return PTR_ERR(s); | 377 | return ERR_CAST(s); |
378 | 378 | ||
379 | if (!s->s_root) { | 379 | if (!s->s_root) { |
380 | s->s_flags = flags; | 380 | s->s_flags = flags; |
@@ -390,13 +390,11 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
390 | if (error) | 390 | if (error) |
391 | goto out_undo_sget; | 391 | goto out_undo_sget; |
392 | 392 | ||
393 | simple_set_mnt(mnt, s); | 393 | return dget(s->s_root); |
394 | |||
395 | return 0; | ||
396 | 394 | ||
397 | out_undo_sget: | 395 | out_undo_sget: |
398 | deactivate_locked_super(s); | 396 | deactivate_locked_super(s); |
399 | return error; | 397 | return ERR_PTR(error); |
400 | } | 398 | } |
401 | 399 | ||
402 | #else | 400 | #else |
@@ -404,10 +402,10 @@ out_undo_sget: | |||
404 | * This supports only the legacy single-instance semantics (no | 402 | * This supports only the legacy single-instance semantics (no |
405 | * multiple-instance semantics) | 403 | * multiple-instance semantics) |
406 | */ | 404 | */ |
407 | static int devpts_get_sb(struct file_system_type *fs_type, int flags, | 405 | static struct dentry *devpts_mount(struct file_system_type *fs_type, int flags, |
408 | const char *dev_name, void *data, struct vfsmount *mnt) | 406 | const char *dev_name, void *data) |
409 | { | 407 | { |
410 | return get_sb_single(fs_type, flags, data, devpts_fill_super, mnt); | 408 | return mount_single(fs_type, flags, data, devpts_fill_super); |
411 | } | 409 | } |
412 | #endif | 410 | #endif |
413 | 411 | ||
@@ -421,7 +419,7 @@ static void devpts_kill_sb(struct super_block *sb) | |||
421 | 419 | ||
422 | static struct file_system_type devpts_fs_type = { | 420 | static struct file_system_type devpts_fs_type = { |
423 | .name = "devpts", | 421 | .name = "devpts", |
424 | .get_sb = devpts_get_sb, | 422 | .mount = devpts_mount, |
425 | .kill_sb = devpts_kill_sb, | 423 | .kill_sb = devpts_kill_sb, |
426 | }; | 424 | }; |
427 | 425 | ||
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 4eba07661e5c..85542a7daf40 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c | |||
@@ -322,12 +322,10 @@ static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent) | |||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
324 | 324 | ||
325 | static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags, | 325 | static struct dentry *fuse_ctl_mount(struct file_system_type *fs_type, |
326 | const char *dev_name, void *raw_data, | 326 | int flags, const char *dev_name, void *raw_data) |
327 | struct vfsmount *mnt) | ||
328 | { | 327 | { |
329 | return get_sb_single(fs_type, flags, raw_data, | 328 | return mount_single(fs_type, flags, raw_data, fuse_ctl_fill_super); |
330 | fuse_ctl_fill_super, mnt); | ||
331 | } | 329 | } |
332 | 330 | ||
333 | static void fuse_ctl_kill_sb(struct super_block *sb) | 331 | static void fuse_ctl_kill_sb(struct super_block *sb) |
@@ -346,7 +344,7 @@ static void fuse_ctl_kill_sb(struct super_block *sb) | |||
346 | static struct file_system_type fuse_ctl_fs_type = { | 344 | static struct file_system_type fuse_ctl_fs_type = { |
347 | .owner = THIS_MODULE, | 345 | .owner = THIS_MODULE, |
348 | .name = "fusectl", | 346 | .name = "fusectl", |
349 | .get_sb = fuse_ctl_get_sb, | 347 | .mount = fuse_ctl_mount, |
350 | .kill_sb = fuse_ctl_kill_sb, | 348 | .kill_sb = fuse_ctl_kill_sb, |
351 | }; | 349 | }; |
352 | 350 | ||
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index d6dc3f61f8ba..4514ebbee4d6 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -1405,16 +1405,16 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) | |||
1405 | return simple_fill_super(sb, 0x6e667364, nfsd_files); | 1405 | return simple_fill_super(sb, 0x6e667364, nfsd_files); |
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | static int nfsd_get_sb(struct file_system_type *fs_type, | 1408 | static struct dentry *nfsd_mount(struct file_system_type *fs_type, |
1409 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1409 | int flags, const char *dev_name, void *data) |
1410 | { | 1410 | { |
1411 | return get_sb_single(fs_type, flags, data, nfsd_fill_super, mnt); | 1411 | return mount_single(fs_type, flags, data, nfsd_fill_super); |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static struct file_system_type nfsd_fs_type = { | 1414 | static struct file_system_type nfsd_fs_type = { |
1415 | .owner = THIS_MODULE, | 1415 | .owner = THIS_MODULE, |
1416 | .name = "nfsd", | 1416 | .name = "nfsd", |
1417 | .get_sb = nfsd_get_sb, | 1417 | .mount = nfsd_mount, |
1418 | .kill_sb = kill_litter_super, | 1418 | .kill_sb = kill_litter_super, |
1419 | }; | 1419 | }; |
1420 | 1420 | ||
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c index ffcd04f0012c..ddb1f41376e5 100644 --- a/fs/openpromfs/inode.c +++ b/fs/openpromfs/inode.c | |||
@@ -415,16 +415,16 @@ out_no_root: | |||
415 | return ret; | 415 | return ret; |
416 | } | 416 | } |
417 | 417 | ||
418 | static int openprom_get_sb(struct file_system_type *fs_type, | 418 | static struct dentry *openprom_mount(struct file_system_type *fs_type, |
419 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 419 | int flags, const char *dev_name, void *data) |
420 | { | 420 | { |
421 | return get_sb_single(fs_type, flags, data, openprom_fill_super, mnt); | 421 | return mount_single(fs_type, flags, data, openprom_fill_super) |
422 | } | 422 | } |
423 | 423 | ||
424 | static struct file_system_type openprom_fs_type = { | 424 | static struct file_system_type openprom_fs_type = { |
425 | .owner = THIS_MODULE, | 425 | .owner = THIS_MODULE, |
426 | .name = "openpromfs", | 426 | .name = "openpromfs", |
427 | .get_sb = openprom_get_sb, | 427 | .mount = openprom_mount, |
428 | .kill_sb = kill_anon_super, | 428 | .kill_sb = kill_anon_super, |
429 | }; | 429 | }; |
430 | 430 | ||
diff --git a/fs/super.c b/fs/super.c index 40989e9a2606..6f021a171ac6 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -900,29 +900,42 @@ static int compare_single(struct super_block *s, void *p) | |||
900 | return 1; | 900 | return 1; |
901 | } | 901 | } |
902 | 902 | ||
903 | int get_sb_single(struct file_system_type *fs_type, | 903 | struct dentry *mount_single(struct file_system_type *fs_type, |
904 | int flags, void *data, | 904 | int flags, void *data, |
905 | int (*fill_super)(struct super_block *, void *, int), | 905 | int (*fill_super)(struct super_block *, void *, int)) |
906 | struct vfsmount *mnt) | ||
907 | { | 906 | { |
908 | struct super_block *s; | 907 | struct super_block *s; |
909 | int error; | 908 | int error; |
910 | 909 | ||
911 | s = sget(fs_type, compare_single, set_anon_super, NULL); | 910 | s = sget(fs_type, compare_single, set_anon_super, NULL); |
912 | if (IS_ERR(s)) | 911 | if (IS_ERR(s)) |
913 | return PTR_ERR(s); | 912 | return ERR_CAST(s); |
914 | if (!s->s_root) { | 913 | if (!s->s_root) { |
915 | s->s_flags = flags; | 914 | s->s_flags = flags; |
916 | error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); | 915 | error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); |
917 | if (error) { | 916 | if (error) { |
918 | deactivate_locked_super(s); | 917 | deactivate_locked_super(s); |
919 | return error; | 918 | return ERR_PTR(error); |
920 | } | 919 | } |
921 | s->s_flags |= MS_ACTIVE; | 920 | s->s_flags |= MS_ACTIVE; |
922 | } else { | 921 | } else { |
923 | do_remount_sb(s, flags, data, 0); | 922 | do_remount_sb(s, flags, data, 0); |
924 | } | 923 | } |
925 | simple_set_mnt(mnt, s); | 924 | return dget(s->s_root); |
925 | } | ||
926 | EXPORT_SYMBOL(mount_single); | ||
927 | |||
928 | int get_sb_single(struct file_system_type *fs_type, | ||
929 | int flags, void *data, | ||
930 | int (*fill_super)(struct super_block *, void *, int), | ||
931 | struct vfsmount *mnt) | ||
932 | { | ||
933 | struct dentry *root; | ||
934 | root = mount_single(fs_type, flags, data, fill_super); | ||
935 | if (IS_ERR(root)) | ||
936 | return PTR_ERR(root); | ||
937 | mnt->mnt_root = root; | ||
938 | mnt->mnt_sb = root->d_sb; | ||
926 | return 0; | 939 | return 0; |
927 | } | 940 | } |
928 | 941 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2fab5a24ca51..0aa2f1202afa 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1799,6 +1799,9 @@ extern int get_sb_bdev(struct file_system_type *fs_type, | |||
1799 | int flags, const char *dev_name, void *data, | 1799 | int flags, const char *dev_name, void *data, |
1800 | int (*fill_super)(struct super_block *, void *, int), | 1800 | int (*fill_super)(struct super_block *, void *, int), |
1801 | struct vfsmount *mnt); | 1801 | struct vfsmount *mnt); |
1802 | extern struct dentry *mount_single(struct file_system_type *fs_type, | ||
1803 | int flags, void *data, | ||
1804 | int (*fill_super)(struct super_block *, void *, int)); | ||
1802 | extern int get_sb_single(struct file_system_type *fs_type, | 1805 | extern int get_sb_single(struct file_system_type *fs_type, |
1803 | int flags, void *data, | 1806 | int flags, void *data, |
1804 | int (*fill_super)(struct super_block *, void *, int), | 1807 | int (*fill_super)(struct super_block *, void *, int), |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 7df92d237cb8..10a17a37ec4e 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/sunrpc/rpc_pipe_fs.h> | 28 | #include <linux/sunrpc/rpc_pipe_fs.h> |
29 | #include <linux/sunrpc/cache.h> | 29 | #include <linux/sunrpc/cache.h> |
30 | 30 | ||
31 | static struct vfsmount *rpc_mount __read_mostly; | 31 | static struct vfsmount *rpc_mnt __read_mostly; |
32 | static int rpc_mount_count; | 32 | static int rpc_mount_count; |
33 | 33 | ||
34 | static struct file_system_type rpc_pipe_fs_type; | 34 | static struct file_system_type rpc_pipe_fs_type; |
@@ -417,16 +417,16 @@ struct vfsmount *rpc_get_mount(void) | |||
417 | { | 417 | { |
418 | int err; | 418 | int err; |
419 | 419 | ||
420 | err = simple_pin_fs(&rpc_pipe_fs_type, &rpc_mount, &rpc_mount_count); | 420 | err = simple_pin_fs(&rpc_pipe_fs_type, &rpc_mnt, &rpc_mount_count); |
421 | if (err != 0) | 421 | if (err != 0) |
422 | return ERR_PTR(err); | 422 | return ERR_PTR(err); |
423 | return rpc_mount; | 423 | return rpc_mnt; |
424 | } | 424 | } |
425 | EXPORT_SYMBOL_GPL(rpc_get_mount); | 425 | EXPORT_SYMBOL_GPL(rpc_get_mount); |
426 | 426 | ||
427 | void rpc_put_mount(void) | 427 | void rpc_put_mount(void) |
428 | { | 428 | { |
429 | simple_release_fs(&rpc_mount, &rpc_mount_count); | 429 | simple_release_fs(&rpc_mnt, &rpc_mount_count); |
430 | } | 430 | } |
431 | EXPORT_SYMBOL_GPL(rpc_put_mount); | 431 | EXPORT_SYMBOL_GPL(rpc_put_mount); |
432 | 432 | ||
@@ -1018,17 +1018,17 @@ rpc_fill_super(struct super_block *sb, void *data, int silent) | |||
1018 | return 0; | 1018 | return 0; |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | static int | 1021 | static struct dentry * |
1022 | rpc_get_sb(struct file_system_type *fs_type, | 1022 | rpc_mount(struct file_system_type *fs_type, |
1023 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 1023 | int flags, const char *dev_name, void *data) |
1024 | { | 1024 | { |
1025 | return get_sb_single(fs_type, flags, data, rpc_fill_super, mnt); | 1025 | return mount_single(fs_type, flags, data, rpc_fill_super); |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | static struct file_system_type rpc_pipe_fs_type = { | 1028 | static struct file_system_type rpc_pipe_fs_type = { |
1029 | .owner = THIS_MODULE, | 1029 | .owner = THIS_MODULE, |
1030 | .name = "rpc_pipefs", | 1030 | .name = "rpc_pipefs", |
1031 | .get_sb = rpc_get_sb, | 1031 | .mount = rpc_mount, |
1032 | .kill_sb = kill_litter_super, | 1032 | .kill_sb = kill_litter_super, |
1033 | }; | 1033 | }; |
1034 | 1034 | ||
diff --git a/security/inode.c b/security/inode.c index cb8f47c66a58..c4df2fbebe6b 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -131,17 +131,17 @@ static int fill_super(struct super_block *sb, void *data, int silent) | |||
131 | return simple_fill_super(sb, SECURITYFS_MAGIC, files); | 131 | return simple_fill_super(sb, SECURITYFS_MAGIC, files); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int get_sb(struct file_system_type *fs_type, | 134 | static struct dentry *get_sb(struct file_system_type *fs_type, |
135 | int flags, const char *dev_name, | 135 | int flags, const char *dev_name, |
136 | void *data, struct vfsmount *mnt) | 136 | void *data) |
137 | { | 137 | { |
138 | return get_sb_single(fs_type, flags, data, fill_super, mnt); | 138 | return mount_single(fs_type, flags, data, fill_super); |
139 | } | 139 | } |
140 | 140 | ||
141 | static struct file_system_type fs_type = { | 141 | static struct file_system_type fs_type = { |
142 | .owner = THIS_MODULE, | 142 | .owner = THIS_MODULE, |
143 | .name = "securityfs", | 143 | .name = "securityfs", |
144 | .get_sb = get_sb, | 144 | .mount = get_sb, |
145 | .kill_sb = kill_litter_super, | 145 | .kill_sb = kill_litter_super, |
146 | }; | 146 | }; |
147 | 147 | ||
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 55a755c1a1bd..073fd5b0a53a 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -1909,16 +1909,15 @@ err: | |||
1909 | goto out; | 1909 | goto out; |
1910 | } | 1910 | } |
1911 | 1911 | ||
1912 | static int sel_get_sb(struct file_system_type *fs_type, | 1912 | static struct dentry *sel_mount(struct file_system_type *fs_type, |
1913 | int flags, const char *dev_name, void *data, | 1913 | int flags, const char *dev_name, void *data) |
1914 | struct vfsmount *mnt) | ||
1915 | { | 1914 | { |
1916 | return get_sb_single(fs_type, flags, data, sel_fill_super, mnt); | 1915 | return mount_single(fs_type, flags, data, sel_fill_super); |
1917 | } | 1916 | } |
1918 | 1917 | ||
1919 | static struct file_system_type sel_fs_type = { | 1918 | static struct file_system_type sel_fs_type = { |
1920 | .name = "selinuxfs", | 1919 | .name = "selinuxfs", |
1921 | .get_sb = sel_get_sb, | 1920 | .mount = sel_mount, |
1922 | .kill_sb = kill_litter_super, | 1921 | .kill_sb = kill_litter_super, |
1923 | }; | 1922 | }; |
1924 | 1923 | ||
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 7512502d0162..dc1fd6239f24 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -1310,27 +1310,25 @@ static int smk_fill_super(struct super_block *sb, void *data, int silent) | |||
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | /** | 1312 | /** |
1313 | * smk_get_sb - get the smackfs superblock | 1313 | * smk_mount - get the smackfs superblock |
1314 | * @fs_type: passed along without comment | 1314 | * @fs_type: passed along without comment |
1315 | * @flags: passed along without comment | 1315 | * @flags: passed along without comment |
1316 | * @dev_name: passed along without comment | 1316 | * @dev_name: passed along without comment |
1317 | * @data: passed along without comment | 1317 | * @data: passed along without comment |
1318 | * @mnt: passed along without comment | ||
1319 | * | 1318 | * |
1320 | * Just passes everything along. | 1319 | * Just passes everything along. |
1321 | * | 1320 | * |
1322 | * Returns what the lower level code does. | 1321 | * Returns what the lower level code does. |
1323 | */ | 1322 | */ |
1324 | static int smk_get_sb(struct file_system_type *fs_type, | 1323 | static struct dentry *smk_mount(struct file_system_type *fs_type, |
1325 | int flags, const char *dev_name, void *data, | 1324 | int flags, const char *dev_name, void *data) |
1326 | struct vfsmount *mnt) | ||
1327 | { | 1325 | { |
1328 | return get_sb_single(fs_type, flags, data, smk_fill_super, mnt); | 1326 | return mount_single(fs_type, flags, data, smk_fill_super); |
1329 | } | 1327 | } |
1330 | 1328 | ||
1331 | static struct file_system_type smk_fs_type = { | 1329 | static struct file_system_type smk_fs_type = { |
1332 | .name = "smackfs", | 1330 | .name = "smackfs", |
1333 | .get_sb = smk_get_sb, | 1331 | .mount = smk_mount, |
1334 | .kill_sb = kill_litter_super, | 1332 | .kill_sb = kill_litter_super, |
1335 | }; | 1333 | }; |
1336 | 1334 | ||