aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-11-28 11:30:53 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 13:57:36 -0500
commit39e3c9553f34381a1b664c27b0c696a266a5735e (patch)
treef754789dccac7a017ee8feb602b01dd42b73023d /fs/dcache.c
parent741b7c3f77937b2fb7c10aeb4c5c621463582583 (diff)
vfs: remove DCACHE_NEED_LOOKUP
The code that relied on that flag was ripped out of btrfs quite some time ago, and never added back. Josef indicated that he was going to take a different approach to the problem in btrfs, and that we could just eliminate this flag. Cc: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c33
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)
455EXPORT_SYMBOL(d_drop); 455EXPORT_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 */
466void 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}
473EXPORT_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 */