Skip to content

Commit

Permalink
fuse: timeout comparison fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi committed Jul 7, 2014
1 parent 1860e37 commit 126b9d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
inode = ACCESS_ONCE(entry->d_inode);
if (inode && is_bad_inode(inode))
goto invalid;
else if (fuse_dentry_time(entry) < get_jiffies_64()) {
else if (time_before64(fuse_dentry_time(entry), get_jiffies_64())) {
int err;
struct fuse_entry_out outarg;
struct fuse_req *req;
Expand Down Expand Up @@ -985,7 +985,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat,
int err;
bool r;

if (fi->i_time < get_jiffies_64()) {
if (time_before64(fi->i_time, get_jiffies_64())) {
r = true;
err = fuse_do_getattr(inode, stat, file);
} else {
Expand Down Expand Up @@ -1171,7 +1171,7 @@ static int fuse_permission(struct inode *inode, int mask)
((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) {
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;

err = fuse_perm_getattr(inode, mask);
Expand Down

0 comments on commit 126b9d4

Please sign in to comment.