diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-25 11:46:36 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:31 -0400 |
commit | 3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf (patch) | |
tree | bd758d7f15f24aed225a64de77cc535785c50f96 /fs/super.c | |
parent | fc14f2fef682df677d64a145256dbd263df2aa7b (diff) | |
download | linux-3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf.tar.gz linux-3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf.tar.bz2 linux-3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf.zip |
convert get_sb_nodev() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/fs/super.c b/fs/super.c index 6f021a171ac6..f6a7bf1fff2b 100644 --- a/fs/super.c +++ b/fs/super.c @@ -870,29 +870,42 @@ void kill_block_super(struct super_block *sb) EXPORT_SYMBOL(kill_block_super); #endif -int get_sb_nodev(struct file_system_type *fs_type, +struct dentry *mount_nodev(struct file_system_type *fs_type, int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt) + int (*fill_super)(struct super_block *, void *, int)) { int error; struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); if (IS_ERR(s)) - return PTR_ERR(s); + return ERR_CAST(s); s->s_flags = flags; error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); if (error) { deactivate_locked_super(s); - return error; + return ERR_PTR(error); } s->s_flags |= MS_ACTIVE; - simple_set_mnt(mnt, s); - return 0; + return dget(s->s_root); } +EXPORT_SYMBOL(mount_nodev); + +int get_sb_nodev(struct file_system_type *fs_type, + int flags, void *data, + int (*fill_super)(struct super_block *, void *, int), + struct vfsmount *mnt) +{ + struct dentry *root; + root = mount_nodev(fs_type, flags, data, fill_super); + if (IS_ERR(root)) + return PTR_ERR(root); + mnt->mnt_root = root; + mnt->mnt_sb = root->d_sb; + return 0; +} EXPORT_SYMBOL(get_sb_nodev); static int compare_single(struct super_block *s, void *p) |