aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-24 17:48:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:16:28 -0400
commitfc14f2fef682df677d64a145256dbd263df2aa7b (patch)
tree74f6b939fbad959a43c04ec646cd0adc8af5f53a /drivers
parent848b83a59b772b8f102bc5e3f1187c2fa5676959 (diff)
convert get_sb_single() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/devtmpfs.c18
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c14
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c14
-rw-r--r--drivers/isdn/capi/capifs.c8
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c9
-rw-r--r--drivers/oprofile/oprofilefs.c8
-rw-r--r--drivers/usb/core/inode.c8
-rw-r--r--drivers/usb/gadget/f_fs.c14
-rw-r--r--drivers/usb/gadget/inode.c10
-rw-r--r--drivers/xen/xenfs/super.c8
10 files changed, 55 insertions, 56 deletions
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 @@
29static struct vfsmount *dev_mnt; 29static struct vfsmount *dev_mnt;
30 30
31#if defined CONFIG_DEVTMPFS_MOUNT 31#if defined CONFIG_DEVTMPFS_MOUNT
32static int dev_mount = 1; 32static int mount_dev = 1;
33#else 33#else
34static int dev_mount; 34static int mount_dev;
35#endif 35#endif
36 36
37static DEFINE_MUTEX(dirlock); 37static DEFINE_MUTEX(dirlock);
38 38
39static int __init mount_param(char *str) 39static 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
46static int dev_get_sb(struct file_system_type *fs_type, int flags, 46static 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
56static struct file_system_type dev_fs_type = { 56static 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
365static int ipathfs_get_sb(struct file_system_type *fs_type, int flags, 365static 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:
411static struct file_system_type ipathfs_fs_type = { 411static 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
558static int qibfs_get_sb(struct file_system_type *fs_type, int flags, 558static 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)
603static struct file_system_type qibfs_fs_type = { 603static 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
128static int capifs_get_sb(struct file_system_type *fs_type, 128static 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
134static struct file_system_type capifs_fs_type = { 134static 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);
91static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); 91static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);
92 92
93 93
94static int ibmasmfs_get_super(struct file_system_type *fst, 94static 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
101static const struct super_operations ibmasmfs_s_ops = { 100static const struct super_operations ibmasmfs_s_ops = {
@@ -108,7 +107,7 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
108static struct file_system_type ibmasmfs_type = { 107static 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
262static int oprofilefs_get_sb(struct file_system_type *fs_type, 262static 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
269static struct file_system_type oprofilefs_type = { 269static 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
577static int usb_get_sb(struct file_system_type *fs_type, 577static 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
583static struct file_system_type usb_fs_type = { 583static 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
1179static int 1179static struct dentry *
1180ffs_fs_get_sb(struct file_system_type *t, int flags, 1180ffs_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
1207static void 1207static void
@@ -1220,7 +1220,7 @@ ffs_fs_kill_sb(struct super_block *sb)
1220static struct file_system_type ffs_fs_type = { 1220static 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 */
2100static int 2100static struct dentry *
2101gadgetfs_get_sb (struct file_system_type *t, int flags, 2101gadgetfs_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
2107static void 2107static void
@@ -2119,7 +2119,7 @@ gadgetfs_kill_sb (struct super_block *sb)
2119static struct file_system_type gadgetfs_type = { 2119static 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
124static int xenfs_get_sb(struct file_system_type *fs_type, 124static 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
131static struct file_system_type xenfs_type = { 131static 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