aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dcache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 7a3f3e5f9cea..5c8ea15e73a5 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -642,7 +642,7 @@ static inline bool fast_dput(struct dentry *dentry)
642 642
643 /* 643 /*
644 * If we have a d_op->d_delete() operation, we sould not 644 * If we have a d_op->d_delete() operation, we sould not
645 * let the dentry count go to zero, so use "put__or_lock". 645 * let the dentry count go to zero, so use "put_or_lock".
646 */ 646 */
647 if (unlikely(dentry->d_flags & DCACHE_OP_DELETE)) 647 if (unlikely(dentry->d_flags & DCACHE_OP_DELETE))
648 return lockref_put_or_lock(&dentry->d_lockref); 648 return lockref_put_or_lock(&dentry->d_lockref);
@@ -697,7 +697,7 @@ static inline bool fast_dput(struct dentry *dentry)
697 */ 697 */
698 smp_rmb(); 698 smp_rmb();
699 d_flags = ACCESS_ONCE(dentry->d_flags); 699 d_flags = ACCESS_ONCE(dentry->d_flags);
700 d_flags &= DCACHE_REFERENCED | DCACHE_LRU_LIST; 700 d_flags &= DCACHE_REFERENCED | DCACHE_LRU_LIST | DCACHE_DISCONNECTED;
701 701
702 /* Nothing to do? Dropping the reference was all we needed? */ 702 /* Nothing to do? Dropping the reference was all we needed? */
703 if (d_flags == (DCACHE_REFERENCED | DCACHE_LRU_LIST) && !d_unhashed(dentry)) 703 if (d_flags == (DCACHE_REFERENCED | DCACHE_LRU_LIST) && !d_unhashed(dentry))
@@ -776,6 +776,9 @@ repeat:
776 if (unlikely(d_unhashed(dentry))) 776 if (unlikely(d_unhashed(dentry)))
777 goto kill_it; 777 goto kill_it;
778 778
779 if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED))
780 goto kill_it;
781
779 if (unlikely(dentry->d_flags & DCACHE_OP_DELETE)) { 782 if (unlikely(dentry->d_flags & DCACHE_OP_DELETE)) {
780 if (dentry->d_op->d_delete(dentry)) 783 if (dentry->d_op->d_delete(dentry))
781 goto kill_it; 784 goto kill_it;