diff options
Diffstat (limited to 'fs/dcache.c')
| -rw-r--r-- | fs/dcache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index c37a656802b0..1a976d4efbe1 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -246,13 +246,16 @@ repeat: | |||
| 246 | if (dentry->d_op->d_delete(dentry)) | 246 | if (dentry->d_op->d_delete(dentry)) |
| 247 | goto unhash_it; | 247 | goto unhash_it; |
| 248 | } | 248 | } |
| 249 | |||
| 249 | /* Unreachable? Get rid of it */ | 250 | /* Unreachable? Get rid of it */ |
| 250 | if (d_unhashed(dentry)) | 251 | if (d_unhashed(dentry)) |
| 251 | goto kill_it; | 252 | goto kill_it; |
| 252 | if (list_empty(&dentry->d_lru)) { | 253 | |
| 253 | dentry->d_flags |= DCACHE_REFERENCED; | 254 | /* Otherwise leave it cached and ensure it's on the LRU */ |
| 255 | dentry->d_flags |= DCACHE_REFERENCED; | ||
| 256 | if (list_empty(&dentry->d_lru)) | ||
| 254 | dentry_lru_add(dentry); | 257 | dentry_lru_add(dentry); |
| 255 | } | 258 | |
| 256 | spin_unlock(&dentry->d_lock); | 259 | spin_unlock(&dentry->d_lock); |
| 257 | spin_unlock(&dcache_lock); | 260 | spin_unlock(&dcache_lock); |
| 258 | return; | 261 | return; |
