提交 0903a0c8 编写于 作者: A Al Viro

cifs: get rid of blind d_drop() in readdir

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 c44600c9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册