Skip to content

Commit fc14f2f

Browse files
author
Al Viro
committed
convert get_sb_single() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 848b83a commit fc14f2f

25 files changed

Lines changed: 147 additions & 139 deletions

File tree

‎arch/powerpc/platforms/cell/spufs/inode.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -798,17 +798,17 @@ spufs_fill_super(struct super_block *sb, void *data, int silent)
798798
return spufs_create_root(sb, data);
799799
}
800800

801-
static int
802-
spufs_get_sb(struct file_system_type *fstype, int flags,
803-
const char *name, void *data, struct vfsmount *mnt)
801+
static struct dentry *
802+
spufs_mount(struct file_system_type *fstype, int flags,
803+
const char *name, void *data)
804804
{
805-
return get_sb_single(fstype, flags, data, spufs_fill_super, mnt);
805+
return mount_single(fstype, flags, data, spufs_fill_super);
806806
}
807807

808808
static struct file_system_type spufs_type = {
809809
.owner = THIS_MODULE,
810810
.name = "spufs",
811-
.get_sb = spufs_get_sb,
811+
.mount = spufs_mount,
812812
.kill_sb = kill_litter_super,
813813
};
814814

‎arch/s390/hypfs/inode.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
316316
return 0;
317317
}
318318

319-
static int hypfs_get_super(struct file_system_type *fst, int flags,
320-
const char *devname, void *data, struct vfsmount *mnt)
319+
static struct dentry *hypfs_mount(struct file_system_type *fst, int flags,
320+
const char *devname, void *data)
321321
{
322-
return get_sb_single(fst, flags, data, hypfs_fill_super, mnt);
322+
return mount_single(fst, flags, data, hypfs_fill_super);
323323
}
324324

325325
static void hypfs_kill_super(struct super_block *sb)
@@ -455,7 +455,7 @@ static const struct file_operations hypfs_file_ops = {
455455
static struct file_system_type hypfs_type = {
456456
.owner = THIS_MODULE,
457457
.name = "s390_hypfs",
458-
.get_sb = hypfs_get_super,
458+
.mount = hypfs_mount,
459459
.kill_sb = hypfs_kill_super
460460
};
461461

‎drivers/base/devtmpfs.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,33 @@
2929
static struct vfsmount *dev_mnt;
3030

3131
#if defined CONFIG_DEVTMPFS_MOUNT
32-
static int dev_mount = 1;
32+
static int mount_dev = 1;
3333
#else
34-
static int dev_mount;
34+
static int mount_dev;
3535
#endif
3636

3737
static DEFINE_MUTEX(dirlock);
3838

3939
static int __init mount_param(char *str)
4040
{
41-
dev_mount = simple_strtoul(str, NULL, 0);
41+
mount_dev = simple_strtoul(str, NULL, 0);
4242
return 1;
4343
}
4444
__setup("devtmpfs.mount=", mount_param);
4545

46-
static int dev_get_sb(struct file_system_type *fs_type, int flags,
47-
const char *dev_name, void *data, struct vfsmount *mnt)
46+
static struct dentry *dev_mount(struct file_system_type *fs_type, int flags,
47+
const char *dev_name, void *data)
4848
{
4949
#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);
5151
#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);
5353
#endif
5454
}
5555

5656
static struct file_system_type dev_fs_type = {
5757
.name = "devtmpfs",
58-
.get_sb = dev_get_sb,
58+
.mount = dev_mount,
5959
.kill_sb = kill_litter_super,
6060
};
6161

@@ -351,7 +351,7 @@ int devtmpfs_mount(const char *mntdir)
351351
{
352352
int err;
353353

354-
if (!dev_mount)
354+
if (!mount_dev)
355355
return 0;
356356

357357
if (!dev_mnt)

‎drivers/infiniband/hw/ipath/ipath_fs.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,13 @@ static int ipathfs_fill_super(struct super_block *sb, void *data,
362362
return ret;
363363
}
364364

365-
static int ipathfs_get_sb(struct file_system_type *fs_type, int flags,
366-
const char *dev_name, void *data, struct vfsmount *mnt)
365+
static struct dentry *ipathfs_mount(struct file_system_type *fs_type,
366+
int flags, const char *dev_name, void *data)
367367
{
368-
int ret = get_sb_single(fs_type, flags, data,
369-
ipathfs_fill_super, mnt);
370-
if (ret >= 0)
371-
ipath_super = mnt->mnt_sb;
368+
struct dentry *ret;
369+
ret = mount_single(fs_type, flags, data, ipathfs_fill_super);
370+
if (!IS_ERR(ret))
371+
ipath_super = ret->d_sb;
372372
return ret;
373373
}
374374

@@ -411,7 +411,7 @@ int ipathfs_remove_device(struct ipath_devdata *dd)
411411
static struct file_system_type ipathfs_fs_type = {
412412
.owner = THIS_MODULE,
413413
.name = "ipathfs",
414-
.get_sb = ipathfs_get_sb,
414+
.mount = ipathfs_mount,
415415
.kill_sb = ipathfs_kill_super,
416416
};
417417

‎drivers/infiniband/hw/qib/qib_fs.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,13 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent)
555555
return ret;
556556
}
557557

558-
static int qibfs_get_sb(struct file_system_type *fs_type, int flags,
559-
const char *dev_name, void *data, struct vfsmount *mnt)
558+
static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags,
559+
const char *dev_name, void *data)
560560
{
561-
int ret = get_sb_single(fs_type, flags, data,
562-
qibfs_fill_super, mnt);
563-
if (ret >= 0)
564-
qib_super = mnt->mnt_sb;
561+
struct dentry *ret;
562+
ret = mount_single(fs_type, flags, data, qibfs_fill_super);
563+
if (!IS_ERR(ret))
564+
qib_super = ret->d_sb;
565565
return ret;
566566
}
567567

@@ -603,7 +603,7 @@ int qibfs_remove(struct qib_devdata *dd)
603603
static struct file_system_type qibfs_fs_type = {
604604
.owner = THIS_MODULE,
605605
.name = "ipathfs",
606-
.get_sb = qibfs_get_sb,
606+
.mount = qibfs_mount,
607607
.kill_sb = qibfs_kill_super,
608608
};
609609

‎drivers/isdn/capi/capifs.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
125125
return -ENOMEM;
126126
}
127127

128-
static int capifs_get_sb(struct file_system_type *fs_type,
129-
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
128+
static struct dentry *capifs_mount(struct file_system_type *fs_type,
129+
int flags, const char *dev_name, void *data)
130130
{
131-
return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt);
131+
return mount_single(fs_type, flags, data, capifs_fill_super);
132132
}
133133

134134
static struct file_system_type capifs_fs_type = {
135135
.owner = THIS_MODULE,
136136
.name = "capifs",
137-
.get_sb = capifs_get_sb,
137+
.mount = capifs_mount,
138138
.kill_sb = kill_anon_super,
139139
};
140140

‎drivers/misc/ibmasm/ibmasmfs.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,10 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root);
9191
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);
9292

9393

94-
static int ibmasmfs_get_super(struct file_system_type *fst,
95-
int flags, const char *name, void *data,
96-
struct vfsmount *mnt)
94+
static struct dentry *ibmasmfs_mount(struct file_system_type *fst,
95+
int flags, const char *name, void *data)
9796
{
98-
return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt);
97+
return mount_single(fst, flags, data, ibmasmfs_fill_super);
9998
}
10099

101100
static const struct super_operations ibmasmfs_s_ops = {
@@ -108,7 +107,7 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
108107
static struct file_system_type ibmasmfs_type = {
109108
.owner = THIS_MODULE,
110109
.name = "ibmasmfs",
111-
.get_sb = ibmasmfs_get_super,
110+
.mount = ibmasmfs_mount,
112111
.kill_sb = kill_litter_super,
113112
};
114113

‎drivers/oprofile/oprofilefs.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,17 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent)
259259
}
260260

261261

262-
static int oprofilefs_get_sb(struct file_system_type *fs_type,
263-
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
262+
static struct dentry *oprofilefs_mount(struct file_system_type *fs_type,
263+
int flags, const char *dev_name, void *data)
264264
{
265-
return get_sb_single(fs_type, flags, data, oprofilefs_fill_super, mnt);
265+
return mount_single(fs_type, flags, data, oprofilefs_fill_super);
266266
}
267267

268268

269269
static struct file_system_type oprofilefs_type = {
270270
.owner = THIS_MODULE,
271271
.name = "oprofilefs",
272-
.get_sb = oprofilefs_get_sb,
272+
.mount = oprofilefs_mount,
273273
.kill_sb = kill_litter_super,
274274
};
275275

‎drivers/usb/core/inode.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,16 +574,16 @@ static void fs_remove_file (struct dentry *dentry)
574574

575575
/* --------------------------------------------------------------------- */
576576

577-
static int usb_get_sb(struct file_system_type *fs_type,
578-
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
577+
static struct dentry *usb_mount(struct file_system_type *fs_type,
578+
int flags, const char *dev_name, void *data)
579579
{
580-
return get_sb_single(fs_type, flags, data, usbfs_fill_super, mnt);
580+
return mount_single(fs_type, flags, data, usbfs_fill_super);
581581
}
582582

583583
static struct file_system_type usb_fs_type = {
584584
.owner = THIS_MODULE,
585585
.name = "usbfs",
586-
.get_sb = usb_get_sb,
586+
.mount = usb_mount,
587587
.kill_sb = kill_litter_super,
588588
};
589589

‎drivers/usb/gadget/f_fs.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,9 +1176,9 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)
11761176

11771177
/* "mount -t functionfs dev_name /dev/function" ends up here */
11781178

1179-
static int
1180-
ffs_fs_get_sb(struct file_system_type *t, int flags,
1181-
const char *dev_name, void *opts, struct vfsmount *mnt)
1179+
static struct dentry *
1180+
ffs_fs_mount(struct file_system_type *t, int flags,
1181+
const char *dev_name, void *opts)
11821182
{
11831183
struct ffs_sb_fill_data data = {
11841184
.perms = {
@@ -1194,14 +1194,14 @@ ffs_fs_get_sb(struct file_system_type *t, int flags,
11941194

11951195
ret = functionfs_check_dev_callback(dev_name);
11961196
if (unlikely(ret < 0))
1197-
return ret;
1197+
return ERR_PTR(ret);
11981198

11991199
ret = ffs_fs_parse_opts(&data, opts);
12001200
if (unlikely(ret < 0))
1201-
return ret;
1201+
return ERR_PTR(ret);
12021202

12031203
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);
12051205
}
12061206

12071207
static void
@@ -1220,7 +1220,7 @@ ffs_fs_kill_sb(struct super_block *sb)
12201220
static struct file_system_type ffs_fs_type = {
12211221
.owner = THIS_MODULE,
12221222
.name = "functionfs",
1223-
.get_sb = ffs_fs_get_sb,
1223+
.mount = ffs_fs_mount,
12241224
.kill_sb = ffs_fs_kill_sb,
12251225
};
12261226

0 commit comments

Comments
 (0)