projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b5be62
)
9p: make sure ->lookup() adds fid to the right dentry
author
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 28 Feb 2013 06:29:48 +0000
(
01:29
-0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 28 Feb 2013 06:29:48 +0000
(
01:29
-0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/9p/vfs_inode.c
b/fs/9p/vfs_inode.c
index 80ff01bcae3dad4d7b3a72df69210e2de3298224..d86edc8d3fd05a0176e73136eedb50641eb091b0 100644
(file)
--- a/
fs/9p/vfs_inode.c
+++ b/
fs/9p/vfs_inode.c
@@
-824,7
+824,6
@@
struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
p9_client_clunk(fid);
return ERR_CAST(inode);
}
- v9fs_fid_add(dentry, fid);
/*
* If we had a rename on the server and a parallel lookup
* for the new name, then make sure we instantiate with
@@
-833,7
+832,11
@@
struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
* k/b.
*/
res = d_materialise_unique(dentry, inode);
- if (IS_ERR(res))
+ if (!res)
+ v9fs_fid_add(dentry, fid);
+ else if (!IS_ERR(res))
+ v9fs_fid_add(res, fid);
+ else
p9_client_clunk(fid);
return res;
}