summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-kernel.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-27 12:52:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-27 12:52:46 -0700
commite3300ffef0653774f1099cab153d25d24bd773ce (patch)
tree4d5949f4355df7a222fada6ac5b285db88d048e6 /fs/orangefs/orangefs-kernel.h
parente890038e6a0b1f1c5a5a0037025499704353a3eb (diff)
parent804b1737d71253f01621d2a37a0dce6279a2d440 (diff)
downloadtalos-op-linux-e3300ffef0653774f1099cab153d25d24bd773ce.tar.gz
talos-op-linux-e3300ffef0653774f1099cab153d25d24bd773ce.zip
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/orangefs-kernel.h')
-rw-r--r--fs/orangefs/orangefs-kernel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-kernel.h b/fs/orangefs/orangefs-kernel.h
index 0a82048f3aaf..3bf803d732c5 100644
--- a/fs/orangefs/orangefs-kernel.h
+++ b/fs/orangefs/orangefs-kernel.h
@@ -580,4 +580,11 @@ static inline void orangefs_i_size_write(struct inode *inode, loff_t i_size)
#endif
}
+static inline void orangefs_set_timeout(struct dentry *dentry)
+{
+ unsigned long time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
+
+ dentry->d_fsdata = (void *) time;
+}
+
#endif /* __ORANGEFSKERNEL_H */
OpenPOWER on IntegriCloud