Commit 38f8813c authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Ben Hutchings

fuse: timeout comparison fix

commit 126b9d43 upstream.

As suggested by checkpatch.pl, use time_before64() instead of direct
comparison of jiffies64 values.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent a5931b2e
...@@ -161,7 +161,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) ...@@ -161,7 +161,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
inode = ACCESS_ONCE(entry->d_inode); inode = ACCESS_ONCE(entry->d_inode);
if (inode && is_bad_inode(inode)) if (inode && is_bad_inode(inode))
return 0; return 0;
else if (fuse_dentry_time(entry) < get_jiffies_64()) { else if (time_before64(fuse_dentry_time(entry), get_jiffies_64())) {
int err; int err;
struct fuse_entry_out outarg; struct fuse_entry_out outarg;
struct fuse_conn *fc; struct fuse_conn *fc;
...@@ -849,7 +849,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat, ...@@ -849,7 +849,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat,
int err; int err;
bool r; bool r;
if (fi->i_time < get_jiffies_64()) { if (time_before64(fi->i_time, get_jiffies_64())) {
r = true; r = true;
err = fuse_do_getattr(inode, stat, file); err = fuse_do_getattr(inode, stat, file);
} else { } else {
...@@ -1009,7 +1009,7 @@ static int fuse_permission(struct inode *inode, int mask) ...@@ -1009,7 +1009,7 @@ static int fuse_permission(struct inode *inode, int mask)
((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) { ((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) {
struct fuse_inode *fi = get_fuse_inode(inode); struct fuse_inode *fi = get_fuse_inode(inode);
if (fi->i_time < get_jiffies_64()) { if (time_before64(fi->i_time, get_jiffies_64())) {
refreshed = true; refreshed = true;
err = fuse_perm_getattr(inode, mask); err = fuse_perm_getattr(inode, mask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment