aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zpl_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zpl_inode.c')
-rw-r--r--module/zfs/zpl_inode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
index 3b5643d09..41b91cabc 100644
--- a/module/zfs/zpl_inode.c
+++ b/module/zfs/zpl_inode.c
@@ -384,9 +384,10 @@ zpl_setattr(struct dentry *dentry, struct iattr *ia)
vap->va_mtime = ia->ia_mtime;
vap->va_ctime = ia->ia_ctime;
- if (vap->va_mask & ATTR_ATIME)
- ip->i_atime = timespec_trunc(ia->ia_atime,
+ if (vap->va_mask & ATTR_ATIME) {
+ ip->i_atime = zpl_inode_timespec_trunc(ia->ia_atime,
ip->i_sb->s_time_gran);
+ }
cookie = spl_fstrans_mark();
error = -zfs_setattr(ip, vap, 0, cr);