summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-utils.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2016-07-28 14:46:36 -0400
committerMartin Brandenburg <martin@omnibond.com>2016-08-02 15:39:13 -0400
commit8bbb20a863ca72dfb9025a4653f21b5abf926d20 (patch)
treed4fd9ecb8da7f69ca9e474e003cb2896808121ef /fs/orangefs/orangefs-utils.c
parent957ee43718c5a226fa70ef5e680d037ca9156af6 (diff)
downloadlinux-8bbb20a863ca72dfb9025a4653f21b5abf926d20.tar.gz
linux-8bbb20a863ca72dfb9025a4653f21b5abf926d20.tar.bz2
linux-8bbb20a863ca72dfb9025a4653f21b5abf926d20.zip
orangefs: Account for jiffies wraparound.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-utils.c')
-rw-r--r--fs/orangefs/orangefs-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index cd512a3a9c52..d13c7291fd05 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -262,7 +262,7 @@ int orangefs_inode_getattr(struct inode *inode, int new, int bypass)
get_khandle_from_ino(inode));
if (!new && !bypass) {
- if (orangefs_inode->getattr_time > jiffies)
+ if (time_before(jiffies, orangefs_inode->getattr_time))
return 0;
}
@@ -421,7 +421,7 @@ int orangefs_inode_setattr(struct inode *inode, struct iattr *iattr)
ClearMtimeFlag(orangefs_inode);
ClearCtimeFlag(orangefs_inode);
ClearModeFlag(orangefs_inode);
- orangefs_inode->getattr_time = 0;
+ orangefs_inode->getattr_time = jiffies - 1;
}
return ret;