From: "Yan, Zheng" <[email protected]>

dentry_lru_prune() should always call file system's d_prune callback.

Signed-off-by: Yan, Zheng <[email protected]>
---
 fs/dcache.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 19153a0..f0060aa 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -344,14 +344,9 @@ static void dentry_lru_del(struct dentry *dentry)
  */
 static void dentry_lru_prune(struct dentry *dentry)
 {
-       if (!list_empty(&dentry->d_lru)) {
-               if (dentry->d_flags & DCACHE_OP_PRUNE)
-                       dentry->d_op->d_prune(dentry);
-
-               spin_lock(&dcache_lru_lock);
-               __dentry_lru_del(dentry);
-               spin_unlock(&dcache_lru_lock);
-       }
+       if (dentry->d_flags & DCACHE_OP_PRUNE)
+               dentry->d_op->d_prune(dentry);
+       dentry_lru_del(dentry);
 }
 
 static void dentry_lru_move_list(struct dentry *dentry, struct list_head *list)
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to