aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-07-07 09:28:50 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2014-07-07 09:28:50 -0400
commit126b9d4365b110c157bc4cbc32540dfa66c9c85a (patch)
tree3e6b05fcc95c37f0045dfccbc1548f2107d85099
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
fuse: timeout comparison fix
As suggested by checkpatch.pl, use time_before64() instead of direct comparison of jiffies64 values. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: <stable@vger.kernel.org>
-rw-r--r--fs/fuse/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 42198359fa1b..225176203a8c 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -198,7 +198,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
198 inode = ACCESS_ONCE(entry->d_inode); 198 inode = ACCESS_ONCE(entry->d_inode);
199 if (inode && is_bad_inode(inode)) 199 if (inode && is_bad_inode(inode))
200 goto invalid; 200 goto invalid;
201 else if (fuse_dentry_time(entry) < get_jiffies_64()) { 201 else if (time_before64(fuse_dentry_time(entry), get_jiffies_64())) {
202 int err; 202 int err;
203 struct fuse_entry_out outarg; 203 struct fuse_entry_out outarg;
204 struct fuse_req *req; 204 struct fuse_req *req;
@@ -985,7 +985,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat,
985 int err; 985 int err;
986 bool r; 986 bool r;
987 987
988 if (fi->i_time < get_jiffies_64()) { 988 if (time_before64(fi->i_time, get_jiffies_64())) {
989 r = true; 989 r = true;
990 err = fuse_do_getattr(inode, stat, file); 990 err = fuse_do_getattr(inode, stat, file);
991 } else { 991 } else {
@@ -1171,7 +1171,7 @@ static int fuse_permission(struct inode *inode, int mask)
1171 ((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) { 1171 ((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) {
1172 struct fuse_inode *fi = get_fuse_inode(inode); 1172 struct fuse_inode *fi = get_fuse_inode(inode);
1173 1173
1174 if (fi->i_time < get_jiffies_64()) { 1174 if (time_before64(fi->i_time, get_jiffies_64())) {
1175 refreshed = true; 1175 refreshed = true;
1176 1176
1177 err = fuse_perm_getattr(inode, mask); 1177 err = fuse_perm_getattr(inode, mask);