diff options
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index a1ff91eef108..a5b76b647c6d 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -478,11 +478,12 @@ static void prune_dcache(int count, struct super_block *sb) | |||
478 | up_read(s_umount); | 478 | up_read(s_umount); |
479 | } | 479 | } |
480 | spin_unlock(&dentry->d_lock); | 480 | spin_unlock(&dentry->d_lock); |
481 | /* Cannot remove the first dentry, and it isn't appropriate | 481 | /* |
482 | * to move it to the head of the list, so give up, and try | 482 | * Insert dentry at the head of the list as inserting at the |
483 | * later | 483 | * tail leads to a cycle. |
484 | */ | 484 | */ |
485 | break; | 485 | list_add(&dentry->d_lru, &dentry_unused); |
486 | dentry_stat.nr_unused++; | ||
486 | } | 487 | } |
487 | spin_unlock(&dcache_lock); | 488 | spin_unlock(&dcache_lock); |
488 | } | 489 | } |