Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210641
b: refs/heads/master
c: 5c25f34
h: refs/heads/master
i:
  210639: 7fdefaa
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Eric Van Hensbergen committed Sep 13, 2010
1 parent bdde485 commit 37df858
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62b2be591a9b12c550308ef7718a31abfc815b50
refs/heads/master: 5c25f347a7b00b2ebe0a55c4a3cfe4c3e1e8725e
20 changes: 14 additions & 6 deletions trunk/fs/9p/vfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
fid = v9fs_session_init(v9ses, dev_name, data);
if (IS_ERR(fid)) {
retval = PTR_ERR(fid);
/*
* we need to call session_close to tear down some
* of the data structure setup by session_init
*/
goto close_session;
}

Expand All @@ -144,15 +148,14 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
retval = -ENOMEM;
goto release_sb;
}

sb->s_root = root;

if (v9fs_proto_dotl(v9ses)) {
struct p9_stat_dotl *st = NULL;
st = p9_client_getattr_dotl(fid, P9_STATS_BASIC);
if (IS_ERR(st)) {
retval = PTR_ERR(st);
goto clunk_fid;
goto release_sb;
}

v9fs_stat2inode_dotl(st, root->d_inode);
Expand All @@ -162,7 +165,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,
st = p9_client_stat(fid);
if (IS_ERR(st)) {
retval = PTR_ERR(st);
goto clunk_fid;
goto release_sb;
}

root->d_inode->i_ino = v9fs_qid2ino(&st->qid);
Expand All @@ -174,19 +177,24 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,

v9fs_fid_add(root, fid);

P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
simple_set_mnt(mnt, sb);
return 0;

clunk_fid:
p9_client_clunk(fid);

close_session:
v9fs_session_close(v9ses);
kfree(v9ses);
return retval;

release_sb:
/*
* we will do the session_close and root dentry release
* in the below call. But we need to clunk fid, because we haven't
* attached the fid to dentry so it won't get clunked
* automatically.
*/
p9_client_clunk(fid);
deactivate_locked_super(sb);
return retval;
}
Expand Down

0 comments on commit 37df858

Please sign in to comment.