Skip to content

Commit

Permalink
fuse: convert last timespec use to timespec64
Browse files Browse the repository at this point in the history
All of fuse uses 64-bit timestamps with the exception of the
fuse_change_attributes(), so let's convert this one as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Arnd Bergmann authored and Miklos Szeredi committed Jul 26, 2018
1 parent 46fb504 commit a64ba10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
struct fuse_inode *fi = get_fuse_inode(inode);
bool is_wb = fc->writeback_cache;
loff_t oldsize;
struct timespec old_mtime;
struct timespec64 old_mtime;

spin_lock(&fc->lock);
if ((attr_version != 0 && fi->attr_version > attr_version) ||
Expand All @@ -217,7 +217,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
return;
}

old_mtime = timespec64_to_timespec(inode->i_mtime);
old_mtime = inode->i_mtime;
fuse_change_attributes_common(inode, attr, attr_valid);

oldsize = inode->i_size;
Expand All @@ -237,7 +237,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
truncate_pagecache(inode, attr->size);
inval = true;
} else if (fc->auto_inval_data) {
struct timespec new_mtime = {
struct timespec64 new_mtime = {
.tv_sec = attr->mtime,
.tv_nsec = attr->mtimensec,
};
Expand All @@ -246,7 +246,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
* Auto inval mode also checks and invalidates if mtime
* has changed.
*/
if (!timespec_equal(&old_mtime, &new_mtime))
if (!timespec64_equal(&old_mtime, &new_mtime))
inval = true;
}

Expand Down

0 comments on commit a64ba10

Please sign in to comment.