coda: convert to new timestamp accessors
authorJeff Layton <jlayton@kernel.org>
Wed, 4 Oct 2023 18:52:10 +0000 (14:52 -0400)
committerChristian Brauner <brauner@kernel.org>
Wed, 18 Oct 2023 11:26:19 +0000 (13:26 +0200)
Convert to using the new inode timestamp accessor functions.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-23-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/coda/coda_linux.c
fs/coda/dir.c
fs/coda/file.c

index ae023853a98f1c97bf5371e0de9f2da8c5f3c1ed..1d2dac95f86a0bbe5ecf322245fc13d6f08d8fa5 100644 (file)
@@ -123,9 +123,11 @@ void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr)
        if (attr->va_size != -1)
                inode->i_blocks = (attr->va_size + 511) >> 9;
        if (attr->va_atime.tv_sec != -1) 
-               inode->i_atime = coda_to_timespec64(attr->va_atime);
+               inode_set_atime_to_ts(inode,
+                                     coda_to_timespec64(attr->va_atime));
        if (attr->va_mtime.tv_sec != -1)
-               inode->i_mtime = coda_to_timespec64(attr->va_mtime);
+               inode_set_mtime_to_ts(inode,
+                                     coda_to_timespec64(attr->va_mtime));
         if (attr->va_ctime.tv_sec != -1)
                inode_set_ctime_to_ts(inode,
                                      coda_to_timespec64(attr->va_ctime));
index cb512b10473bb59a473b9819191dbbd3c3cc12d3..4e552ba7bd43304121fe36f217c84ebc5f88d2c3 100644 (file)
@@ -111,7 +111,7 @@ static inline void coda_dir_update_mtime(struct inode *dir)
        /* optimistically we can also act as if our nose bleeds. The
         * granularity of the mtime is coarse anyways so we might actually be
         * right most of the time. Note: we only do this for directories. */
-       dir->i_mtime = inode_set_ctime_current(dir);
+       inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
 #endif
 }
 
index 42346618b4ed192d0c62d268ab52b941fd204706..16acc58311eab50da0c9bff3a32790f025cd7c32 100644 (file)
@@ -84,7 +84,7 @@ coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to)
        ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos, 0);
        coda_inode->i_size = file_inode(host_file)->i_size;
        coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9;
-       coda_inode->i_mtime = inode_set_ctime_current(coda_inode);
+       inode_set_mtime_to_ts(coda_inode, inode_set_ctime_current(coda_inode));
        inode_unlock(coda_inode);
        file_end_write(host_file);