mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
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: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
ed284c49f6
commit
a8d436f015
@ -2346,10 +2346,10 @@ static void invalidate_aliases(struct inode *inode)
|
|||||||
d_prune_aliases(inode);
|
d_prune_aliases(inode);
|
||||||
/*
|
/*
|
||||||
* For non-directory inode, d_find_alias() only returns
|
* For non-directory inode, d_find_alias() only returns
|
||||||
* connected dentry. After calling d_delete(), the dentry
|
* connected dentry. After calling d_invalidate(), the
|
||||||
* become disconnected.
|
* 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
|
* disconnected dentry. But directory inode should have
|
||||||
* one alias at most.
|
* one alias at most.
|
||||||
*/
|
*/
|
||||||
@ -2358,7 +2358,7 @@ static void invalidate_aliases(struct inode *inode)
|
|||||||
dput(dn);
|
dput(dn);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
d_delete(dn);
|
d_invalidate(dn);
|
||||||
if (prev)
|
if (prev)
|
||||||
dput(prev);
|
dput(prev);
|
||||||
prev = dn;
|
prev = dn;
|
||||||
|
Loading…
Reference in New Issue
Block a user