diff options
author | Martin Brandenburg <martin@omnibond.com> | 2016-02-08 23:01:29 +0100 |
---|---|---|
committer | Martin Brandenburg <martin@omnibond.com> | 2016-08-02 21:38:21 +0200 |
commit | 31b7c1ab4ed14d3aeb658e11a114860a64290fea (patch) | |
tree | 3a5a9575a51456d414d70ec800df567544c55aea /fs/orangefs/dcache.c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s39... (diff) | |
download | linux-31b7c1ab4ed14d3aeb658e11a114860a64290fea.tar.xz linux-31b7c1ab4ed14d3aeb658e11a114860a64290fea.zip |
orangefs: Use d_time to avoid excessive lookups
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/dcache.c')
-rw-r--r-- | fs/orangefs/dcache.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index 5dfc4f3cfe68..dcb55bbb0b69 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -73,6 +73,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry) } } + dentry->d_time = jiffies + HZ; ret = 1; out_release_op: op_release(new_op); @@ -94,6 +95,9 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) { int ret; + if (dentry->d_time > jiffies) + return 1; + if (flags & LOOKUP_RCU) return -ECHILD; |