diff options
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 3a463d0c4fe8..1782be3fc3ef 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -455,24 +455,6 @@ void d_drop(struct dentry *dentry) | |||
455 | EXPORT_SYMBOL(d_drop); | 455 | EXPORT_SYMBOL(d_drop); |
456 | 456 | ||
457 | /* | 457 | /* |
458 | * d_clear_need_lookup - drop a dentry from cache and clear the need lookup flag | ||
459 | * @dentry: dentry to drop | ||
460 | * | ||
461 | * This is called when we do a lookup on a placeholder dentry that needed to be | ||
462 | * looked up. The dentry should have been hashed in order for it to be found by | ||
463 | * the lookup code, but now needs to be unhashed while we do the actual lookup | ||
464 | * and clear the DCACHE_NEED_LOOKUP flag. | ||
465 | */ | ||
466 | void d_clear_need_lookup(struct dentry *dentry) | ||
467 | { | ||
468 | spin_lock(&dentry->d_lock); | ||
469 | __d_drop(dentry); | ||
470 | dentry->d_flags &= ~DCACHE_NEED_LOOKUP; | ||
471 | spin_unlock(&dentry->d_lock); | ||
472 | } | ||
473 | EXPORT_SYMBOL(d_clear_need_lookup); | ||
474 | |||
475 | /* | ||
476 | * Finish off a dentry we've decided to kill. | 458 | * Finish off a dentry we've decided to kill. |
477 | * dentry->d_lock must be held, returns with it unlocked. | 459 | * dentry->d_lock must be held, returns with it unlocked. |
478 | * If ref is non-zero, then decrement the refcount too. | 460 | * If ref is non-zero, then decrement the refcount too. |
@@ -565,13 +547,7 @@ repeat: | |||
565 | if (d_unhashed(dentry)) | 547 | if (d_unhashed(dentry)) |
566 | goto kill_it; | 548 | goto kill_it; |
567 | 549 | ||
568 | /* | 550 | dentry->d_flags |= DCACHE_REFERENCED; |
569 | * If this dentry needs lookup, don't set the referenced flag so that it | ||
570 | * is more likely to be cleaned up by the dcache shrinker in case of | ||
571 | * memory pressure. | ||
572 | */ | ||
573 | if (!d_need_lookup(dentry)) | ||
574 | dentry->d_flags |= DCACHE_REFERENCED; | ||
575 | dentry_lru_add(dentry); | 551 | dentry_lru_add(dentry); |
576 | 552 | ||
577 | dentry->d_count--; | 553 | dentry->d_count--; |
@@ -1737,13 +1713,6 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, | |||
1737 | } | 1713 | } |
1738 | 1714 | ||
1739 | /* | 1715 | /* |
1740 | * We are going to instantiate this dentry, unhash it and clear the | ||
1741 | * lookup flag so we can do that. | ||
1742 | */ | ||
1743 | if (unlikely(d_need_lookup(found))) | ||
1744 | d_clear_need_lookup(found); | ||
1745 | |||
1746 | /* | ||
1747 | * Negative dentry: instantiate it unless the inode is a directory and | 1716 | * Negative dentry: instantiate it unless the inode is a directory and |
1748 | * already has a dentry. | 1717 | * already has a dentry. |
1749 | */ | 1718 | */ |