提交 a8d436f0 编写于 作者: Y Yan, Zheng 提交者: Sage Weil

ceph: use d_invalidate() to invalidate aliases

d_invalidate() is the standard VFS method to invalidate dentry.
compare to d_delete(), it also try shrinking children dentries.
Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: NSage Weil <sage@inktank.com>
上级 ed284c49
......@@ -2346,10 +2346,10 @@ static void invalidate_aliases(struct inode *inode)
d_prune_aliases(inode);
/*
* For non-directory inode, d_find_alias() only returns
* connected dentry. After calling d_delete(), the dentry
* become disconnected.
* connected dentry. After calling d_invalidate(), the
* dentry become disconnected.
*
* For directory inode, d_find_alias() only can return
* For directory inode, d_find_alias() can return
* disconnected dentry. But directory inode should have
* one alias at most.
*/
......@@ -2358,7 +2358,7 @@ static void invalidate_aliases(struct inode *inode)
dput(dn);
break;
}
d_delete(dn);
d_invalidate(dn);
if (prev)
dput(prev);
prev = dn;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册