diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-29 22:11:06 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-29 22:11:06 -0500 |
commit | 0903a0c8491c1e987dfc6eb294199a36760398bc (patch) | |
tree | c84f18c8cb39af36fc0492ceb930038879be9da1 /fs/cifs/readdir.c | |
parent | c44600c9d1de64314c2bd58103f15acb53e10073 (diff) |
cifs: get rid of blind d_drop() in readdir
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index f9b5d3d6cf3..1c576e87136 100644 --- 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); |