[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621144735.55953-52-jlayton@kernel.org>
Date: Wed, 21 Jun 2023 10:46:06 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>,
Mike Marshall <hubcap@...ibond.com>,
Martin Brandenburg <martin@...ibond.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
devel@...ts.orangefs.org, linux-kernel@...r.kernel.org
Subject: [PATCH 53/79] orangefs: switch to new ctime accessors
In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@...nel.org>
---
fs/orangefs/namei.c | 2 +-
fs/orangefs/orangefs-utils.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
index 77518e248cf7..14085537ba1c 100644
--- a/fs/orangefs/namei.c
+++ b/fs/orangefs/namei.c
@@ -421,7 +421,7 @@ static int orangefs_rename(struct mnt_idmap *idmap,
ret);
if (new_dentry->d_inode)
- new_dentry->d_inode->i_ctime = current_time(new_dentry->d_inode);
+ inode_ctime_set_current(new_dentry->d_inode);
op_release(new_op);
return ret;
diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index 46b7dcff18ac..4d12efb2ee85 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -361,11 +361,11 @@ int orangefs_inode_getattr(struct inode *inode, int flags)
downcall.resp.getattr.attributes.atime;
inode->i_mtime.tv_sec = (time64_t)new_op->
downcall.resp.getattr.attributes.mtime;
- inode->i_ctime.tv_sec = (time64_t)new_op->
- downcall.resp.getattr.attributes.ctime;
+ inode_ctime_set_sec(inode,
+ (time64_t)new_op->downcall.resp.getattr.attributes.ctime);
inode->i_atime.tv_nsec = 0;
inode->i_mtime.tv_nsec = 0;
- inode->i_ctime.tv_nsec = 0;
+ inode_ctime_set_nsec(inode, 0);
/* special case: mark the root inode as sticky */
inode->i_mode = type | (is_root_handle(inode) ? S_ISVTX : 0) |
--
2.41.0
Powered by blists - more mailing lists