diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-27 19:52:46 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-27 19:52:46 (GMT) |
commit | e3300ffef0653774f1099cab153d25d24bd773ce (patch) | |
tree | 4d5949f4355df7a222fada6ac5b285db88d048e6 /fs/orangefs/dcache.c | |
parent | e890038e6a0b1f1c5a5a0037025499704353a3eb (diff) | |
parent | 804b1737d71253f01621d2a37a0dce6279a2d440 (diff) | |
download | linux-e3300ffef0653774f1099cab153d25d24bd773ce.tar.xz |
Merge tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux
Pull oreangefs updates from Mike Marshall:
"A couple of orangefs cleanups sent in by other developers:
- use d_fsdata instead of d_time (Miklos Szeredi)
- use file_inode(file) instead of file->f_path.dentry->d_inode (Amir
Goldstein)"
* tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
orangefs: don't use d_time
orangefs: user file_inode() where it is due
Diffstat (limited to 'fs/orangefs/dcache.c')
-rw-r--r-- | fs/orangefs/dcache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/orangefs/dcache.c b/fs/orangefs/dcache.c index 1e8fe84..5355efb 100644 --- a/fs/orangefs/dcache.c +++ b/fs/orangefs/dcache.c @@ -73,7 +73,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry) } } - dentry->d_time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000; + orangefs_set_timeout(dentry); ret = 1; out_release_op: op_release(new_op); @@ -94,8 +94,9 @@ out_drop: static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags) { int ret; + unsigned long time = (unsigned long) dentry->d_fsdata; - if (time_before(jiffies, dentry->d_time)) + if (time_before(jiffies, time)) return 1; if (flags & LOOKUP_RCU) |