[PATCH 43/79] kernfs: switch to new ctime accessors

From: Jeff Layton
Date: Wed Jun 21 2023 - 10:56:28 EST


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@xxxxxxxxxx>
---
fs/kernfs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c
index b22b74d1a115..781093c8acdd 100644
--- a/fs/kernfs/inode.c
+++ b/fs/kernfs/inode.c
@@ -152,7 +152,7 @@ static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
{
inode->i_mode = mode;
inode->i_atime = inode->i_mtime =
- inode->i_ctime = current_time(inode);
+ inode_ctime_set_current(inode);
}

static inline void set_inode_attr(struct inode *inode,
@@ -162,7 +162,7 @@ static inline void set_inode_attr(struct inode *inode,
inode->i_gid = attrs->ia_gid;
inode->i_atime = attrs->ia_atime;
inode->i_mtime = attrs->ia_mtime;
- inode->i_ctime = attrs->ia_ctime;
+ inode_ctime_set(inode, attrs->ia_ctime);
}

static void kernfs_refresh_inode(struct kernfs_node *kn, struct inode *inode)
--
2.41.0