projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c44600c
)
cifs: get rid of blind d_drop() in readdir
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 30 Nov 2012 03:11:06 +0000
(22:11 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 30 Nov 2012 03:11:06 +0000
(22:11 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/cifs/readdir.c
patch
|
blob
|
history
diff --git
a/fs/cifs/readdir.c
b/fs/cifs/readdir.c
index f9b5d3d6cf33461081f4945d61a5d604fe2ef468..1c576e8713669534be76853aa6c45e97482def96 100644
(file)
--- a/
fs/cifs/readdir.c
+++ b/
fs/cifs/readdir.c
@@
-86,14
+86,17
@@
cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
dentry = d_lookup(parent, name);
if (dentry) {
+ int err;
inode = dentry->d_inode;
/* update inode in place if i_ino didn't change */
if (inode && CIFS_I(inode)->uniqueid == fattr->cf_uniqueid) {
cifs_fattr_to_inode(inode, fattr);
return dentry;
}
-
d_drop
(dentry);
+
err = d_invalidate
(dentry);
dput(dentry);
+ if (err)
+ return NULL;
}
dentry = d_alloc(parent, name);