Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360719
b: refs/heads/master
c: 7b5be62
h: refs/heads/master
i:
  360717: 9452540
  360715: 763be0e
  360711: 57a7483
  360703: d8b3d08
v: v3
  • Loading branch information
Al Viro committed Feb 28, 2013
1 parent 736f806 commit 1635e16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 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: 3509b678a6bb93a49d9603c9c8028c8d95019539
refs/heads/master: 7b5be621993567d39f09a5190c4d651241be296f
27 changes: 9 additions & 18 deletions trunk/fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
struct p9_fid *dfid, *fid;
struct inode *inode;
char *name;
int result = 0;

p9_debug(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p flags: %x\n",
dir, dentry->d_name.name, dentry, flags);
Expand All @@ -806,13 +805,11 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
name = (char *) dentry->d_name.name;
fid = p9_client_walk(dfid, 1, &name, 1);
if (IS_ERR(fid)) {
result = PTR_ERR(fid);
if (result == -ENOENT) {
inode = NULL;
goto inst_out;
if (fid == ERR_PTR(-ENOENT)) {
d_add(dentry, NULL);
return NULL;
}

return ERR_PTR(result);
return ERR_CAST(fid);
}
/*
* Make sure we don't use a wrong inode due to parallel
Expand All @@ -824,12 +821,10 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
else
inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb);
if (IS_ERR(inode)) {
result = PTR_ERR(inode);
inode = NULL;
goto error;
p9_client_clunk(fid);
return ERR_CAST(inode);
}
v9fs_fid_add(dentry, fid);
inst_out:
/*
* If we had a rename on the server and a parallel lookup
* for the new name, then make sure we instantiate with
Expand All @@ -838,13 +833,9 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
* k/b.
*/
res = d_materialise_unique(dentry, inode);
if (!IS_ERR(res))
return res;
result = PTR_ERR(res);
error:
p9_client_clunk(fid);

return ERR_PTR(result);
if (IS_ERR(res))
p9_client_clunk(fid);
return res;
}

static int
Expand Down

0 comments on commit 1635e16

Please sign in to comment.