summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-09-29 13:13:36 +1000
committerPaul Mackerras <paulus@samba.org>2005-09-29 13:13:36 +1000
commitab11d1ea281e85895369ef57c5259ad8a432fabb (patch)
tree684147479c6a8bb2fbed21bdcf12de1dd519c730 /fs/9p/vfs_super.c
parent952ecef7a0479049c8abb7c34a688ec2981ceadd (diff)
parent664cceb0093b755739e56572b836a99104ee8a75 (diff)
downloadop-kernel-dev-ab11d1ea281e85895369ef57c5259ad8a432fabb.zip
op-kernel-dev-ab11d1ea281e85895369ef57c5259ad8a432fabb.tar.gz
Merge by hand from Linus' tree.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 1e2b2b5..0957f4d 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -129,8 +129,7 @@ static struct super_block *v9fs_get_sb(struct file_system_type
if ((newfid = v9fs_session_init(v9ses, dev_name, data)) < 0) {
dprintk(DEBUG_ERROR, "problem initiating session\n");
- kfree(v9ses);
- return ERR_PTR(newfid);
+ return newfid;
}
sb = sget(fs_type, NULL, v9fs_set_super, v9ses);
@@ -155,23 +154,19 @@ static struct super_block *v9fs_get_sb(struct file_system_type
sb->s_root = root;
- /* Setup the Root Inode */
- root_fid = v9fs_fid_create(root);
- if (root_fid == NULL) {
- retval = -ENOMEM;
- goto put_back_sb;
- }
-
- root_fid->fidopen = 0;
- root_fid->v9ses = v9ses;
-
stat_result = v9fs_t_stat(v9ses, newfid, &fcall);
if (stat_result < 0) {
dprintk(DEBUG_ERROR, "stat error\n");
v9fs_t_clunk(v9ses, newfid, NULL);
v9fs_put_idpool(newfid, &v9ses->fidpool);
} else {
- root_fid->fid = newfid;
+ /* Setup the Root Inode */
+ root_fid = v9fs_fid_create(root, v9ses, newfid, 0);
+ if (root_fid == NULL) {
+ retval = -ENOMEM;
+ goto put_back_sb;
+ }
+
root_fid->qid = fcall->params.rstat.stat->qid;
root->d_inode->i_ino =
v9fs_qid2ino(&fcall->params.rstat.stat->qid);
OpenPOWER on IntegriCloud