diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-25 15:47:46 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:33 -0400 |
commit | 51139adac92f7160ad3ca1cab2de1b4b8d19dc96 (patch) | |
tree | ea12df0927809e8d5333e82d51cbdb96288c9e6b /fs/libfs.c | |
parent | 3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf (diff) |
convert get_sb_pseudo() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 304a5132ca27..a3accdf528ad 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -201,9 +201,8 @@ static const struct super_operations simple_super_operations = { | |||
201 | * Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that | 201 | * Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that |
202 | * will never be mountable) | 202 | * will never be mountable) |
203 | */ | 203 | */ |
204 | int get_sb_pseudo(struct file_system_type *fs_type, char *name, | 204 | struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name, |
205 | const struct super_operations *ops, unsigned long magic, | 205 | const struct super_operations *ops, unsigned long magic) |
206 | struct vfsmount *mnt) | ||
207 | { | 206 | { |
208 | struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); | 207 | struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); |
209 | struct dentry *dentry; | 208 | struct dentry *dentry; |
@@ -211,7 +210,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, | |||
211 | struct qstr d_name = {.name = name, .len = strlen(name)}; | 210 | struct qstr d_name = {.name = name, .len = strlen(name)}; |
212 | 211 | ||
213 | if (IS_ERR(s)) | 212 | if (IS_ERR(s)) |
214 | return PTR_ERR(s); | 213 | return ERR_CAST(s); |
215 | 214 | ||
216 | s->s_flags = MS_NOUSER; | 215 | s->s_flags = MS_NOUSER; |
217 | s->s_maxbytes = MAX_LFS_FILESIZE; | 216 | s->s_maxbytes = MAX_LFS_FILESIZE; |
@@ -241,12 +240,11 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, | |||
241 | d_instantiate(dentry, root); | 240 | d_instantiate(dentry, root); |
242 | s->s_root = dentry; | 241 | s->s_root = dentry; |
243 | s->s_flags |= MS_ACTIVE; | 242 | s->s_flags |= MS_ACTIVE; |
244 | simple_set_mnt(mnt, s); | 243 | return dget(s->s_root); |
245 | return 0; | ||
246 | 244 | ||
247 | Enomem: | 245 | Enomem: |
248 | deactivate_locked_super(s); | 246 | deactivate_locked_super(s); |
249 | return -ENOMEM; | 247 | return ERR_PTR(-ENOMEM); |
250 | } | 248 | } |
251 | 249 | ||
252 | int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) | 250 | int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) |
@@ -951,7 +949,7 @@ EXPORT_SYMBOL(dcache_dir_lseek); | |||
951 | EXPORT_SYMBOL(dcache_dir_open); | 949 | EXPORT_SYMBOL(dcache_dir_open); |
952 | EXPORT_SYMBOL(dcache_readdir); | 950 | EXPORT_SYMBOL(dcache_readdir); |
953 | EXPORT_SYMBOL(generic_read_dir); | 951 | EXPORT_SYMBOL(generic_read_dir); |
954 | EXPORT_SYMBOL(get_sb_pseudo); | 952 | EXPORT_SYMBOL(mount_pseudo); |
955 | EXPORT_SYMBOL(simple_write_begin); | 953 | EXPORT_SYMBOL(simple_write_begin); |
956 | EXPORT_SYMBOL(simple_write_end); | 954 | EXPORT_SYMBOL(simple_write_end); |
957 | EXPORT_SYMBOL(simple_dir_inode_operations); | 955 | EXPORT_SYMBOL(simple_dir_inode_operations); |