Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189478
b: refs/heads/master
c: 5b0fa20
h: refs/heads/master
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Eric Van Hensbergen committed Apr 5, 2010
1 parent 5b125bd commit a78ff85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 9208d24253e5e644f8cb1b87b69de44897668303
refs/heads/master: 5b0fa207d1a6f27c9a2f2d707147dce01af21db7
12 changes: 10 additions & 2 deletions trunk/fs/9p/fid.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
{
int i, n, l, clone, any, access;
u32 uid;
struct p9_fid *fid;
struct p9_fid *fid, *old_fid = NULL;
struct dentry *d, *ds;
struct v9fs_session_info *v9ses;
char **wnames, *uname;
Expand Down Expand Up @@ -183,10 +183,18 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
l = min(n - i, P9_MAXWELEM);
fid = p9_client_walk(fid, l, &wnames[i], clone);
if (IS_ERR(fid)) {
if (old_fid) {
/*
* If we fail, clunk fid which are mapping
* to path component and not the last component
* of the path.
*/
p9_client_clunk(old_fid);
}
kfree(wnames);
return fid;
}

old_fid = fid;
i += l;
clone = 0;
}
Expand Down

0 comments on commit a78ff85

Please sign in to comment.