diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-02 03:19:54 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-06 15:55:29 -0400 |
commit | a8d436f015b627a55ec3b1d15f13d6ab92dd892b (patch) | |
tree | 5965cb9c6a65598b8f2114bc75974b4c3198cde0 /fs/ceph | |
parent | ed284c49f61165c3ba1b4e6969d1cc30a769c31b (diff) |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 7b451eb7d123..13976c33332e 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2346,10 +2346,10 @@ static void invalidate_aliases(struct inode *inode) | |||
2346 | d_prune_aliases(inode); | 2346 | d_prune_aliases(inode); |
2347 | /* | 2347 | /* |
2348 | * For non-directory inode, d_find_alias() only returns | 2348 | * For non-directory inode, d_find_alias() only returns |
2349 | * connected dentry. After calling d_delete(), the dentry | 2349 | * connected dentry. After calling d_invalidate(), the |
2350 | * become disconnected. | 2350 | * dentry become disconnected. |
2351 | * | 2351 | * |
2352 | * For directory inode, d_find_alias() only can return | 2352 | * For directory inode, d_find_alias() can return |
2353 | * disconnected dentry. But directory inode should have | 2353 | * disconnected dentry. But directory inode should have |
2354 | * one alias at most. | 2354 | * one alias at most. |
2355 | */ | 2355 | */ |
@@ -2358,7 +2358,7 @@ static void invalidate_aliases(struct inode *inode) | |||
2358 | dput(dn); | 2358 | dput(dn); |
2359 | break; | 2359 | break; |
2360 | } | 2360 | } |
2361 | d_delete(dn); | 2361 | d_invalidate(dn); |
2362 | if (prev) | 2362 | if (prev) |
2363 | dput(prev); | 2363 | dput(prev); |
2364 | prev = dn; | 2364 | prev = dn; |