diff options
| -rw-r--r-- | fs/9p/vfs_super.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 48d4215c60a8..c55c614500ad 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
| @@ -68,7 +68,7 @@ static int v9fs_set_super(struct super_block *s, void *data) | |||
| 68 | * v9fs_fill_super - populate superblock with info | 68 | * v9fs_fill_super - populate superblock with info |
| 69 | * @sb: superblock | 69 | * @sb: superblock |
| 70 | * @v9ses: session information | 70 | * @v9ses: session information |
| 71 | * @flags: flags propagated from v9fs_get_sb() | 71 | * @flags: flags propagated from v9fs_mount() |
| 72 | * | 72 | * |
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| @@ -99,18 +99,16 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, | |||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /** | 101 | /** |
| 102 | * v9fs_get_sb - mount a superblock | 102 | * v9fs_mount - mount a superblock |
| 103 | * @fs_type: file system type | 103 | * @fs_type: file system type |
| 104 | * @flags: mount flags | 104 | * @flags: mount flags |
| 105 | * @dev_name: device name that was mounted | 105 | * @dev_name: device name that was mounted |
| 106 | * @data: mount options | 106 | * @data: mount options |
| 107 | * @mnt: mountpoint record to be instantiated | ||
| 108 | * | 107 | * |
| 109 | */ | 108 | */ |
| 110 | 109 | ||
| 111 | static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | 110 | static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, |
| 112 | const char *dev_name, void *data, | 111 | const char *dev_name, void *data) |
| 113 | struct vfsmount *mnt) | ||
| 114 | { | 112 | { |
| 115 | struct super_block *sb = NULL; | 113 | struct super_block *sb = NULL; |
| 116 | struct inode *inode = NULL; | 114 | struct inode *inode = NULL; |
| @@ -124,7 +122,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | |||
| 124 | 122 | ||
| 125 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); | 123 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); |
| 126 | if (!v9ses) | 124 | if (!v9ses) |
| 127 | return -ENOMEM; | 125 | return ERR_PTR(-ENOMEM); |
| 128 | 126 | ||
| 129 | fid = v9fs_session_init(v9ses, dev_name, data); | 127 | fid = v9fs_session_init(v9ses, dev_name, data); |
| 130 | if (IS_ERR(fid)) { | 128 | if (IS_ERR(fid)) { |
| @@ -186,15 +184,15 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, | |||
| 186 | v9fs_fid_add(root, fid); | 184 | v9fs_fid_add(root, fid); |
| 187 | 185 | ||
| 188 | P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); | 186 | P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); |
| 189 | simple_set_mnt(mnt, sb); | 187 | return dget(sb->s_root); |
| 190 | return 0; | ||
| 191 | 188 | ||
| 192 | clunk_fid: | 189 | clunk_fid: |
| 193 | p9_client_clunk(fid); | 190 | p9_client_clunk(fid); |
| 194 | close_session: | 191 | close_session: |
| 195 | v9fs_session_close(v9ses); | 192 | v9fs_session_close(v9ses); |
| 196 | kfree(v9ses); | 193 | kfree(v9ses); |
| 197 | return retval; | 194 | return ERR_PTR(retval); |
| 195 | |||
| 198 | release_sb: | 196 | release_sb: |
| 199 | /* | 197 | /* |
| 200 | * we will do the session_close and root dentry release | 198 | * we will do the session_close and root dentry release |
| @@ -204,7 +202,7 @@ release_sb: | |||
| 204 | */ | 202 | */ |
| 205 | p9_client_clunk(fid); | 203 | p9_client_clunk(fid); |
| 206 | deactivate_locked_super(sb); | 204 | deactivate_locked_super(sb); |
| 207 | return retval; | 205 | return ERR_PTR(retval); |
| 208 | } | 206 | } |
| 209 | 207 | ||
| 210 | /** | 208 | /** |
| @@ -300,7 +298,7 @@ static const struct super_operations v9fs_super_ops_dotl = { | |||
| 300 | 298 | ||
| 301 | struct file_system_type v9fs_fs_type = { | 299 | struct file_system_type v9fs_fs_type = { |
| 302 | .name = "9p", | 300 | .name = "9p", |
| 303 | .get_sb = v9fs_get_sb, | 301 | .mount = v9fs_mount, |
| 304 | .kill_sb = v9fs_kill_super, | 302 | .kill_sb = v9fs_kill_super, |
| 305 | .owner = THIS_MODULE, | 303 | .owner = THIS_MODULE, |
| 306 | .fs_flags = FS_RENAME_DOES_D_MOVE, | 304 | .fs_flags = FS_RENAME_DOES_D_MOVE, |
