Skip to content

Commit

Permalink
ceph: use d_invalidate() to invalidate aliases
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yan, Zheng authored and Sage Weil committed Sep 6, 2013
1 parent ed284c4 commit a8d436f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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;
Expand Down

0 comments on commit a8d436f

Please sign in to comment.