diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-10-04 14:52:37 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-18 14:08:24 +0200 |
commit | 11fec9b9fb04fd1b3330a3b91ab9dcfa81ad5ad3 (patch) | |
tree | c1dafcef904e5305807f9e60c1ce6bf60343af31 /fs/nfsd/blocklayout.c | |
parent | 41d581a9faefe9121e1f52da5bdbf83476e9497e (diff) |
nfsd: convert to new timestamp accessors
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-50-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/nfsd/blocklayout.c')
-rw-r--r-- | fs/nfsd/blocklayout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index 01d7fd108cf3..46fd74d91ea9 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -117,12 +117,13 @@ static __be32 nfsd4_block_commit_blocks(struct inode *inode, struct nfsd4_layoutcommit *lcp, struct iomap *iomaps, int nr_iomaps) { + struct timespec64 mtime = inode_get_mtime(inode); loff_t new_size = lcp->lc_last_wr + 1; struct iattr iattr = { .ia_valid = 0 }; int error; if (lcp->lc_mtime.tv_nsec == UTIME_NOW || - timespec64_compare(&lcp->lc_mtime, &inode->i_mtime) < 0) + timespec64_compare(&lcp->lc_mtime, &mtime) < 0) lcp->lc_mtime = current_time(inode); iattr.ia_valid |= ATTR_ATIME | ATTR_CTIME | ATTR_MTIME; iattr.ia_atime = iattr.ia_ctime = iattr.ia_mtime = lcp->lc_mtime; |