diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 22:01:21 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-24 11:30:01 +0300 |
commit | f7f438589f4686758ee1de99c7723919a2b05d70 (patch) | |
tree | eee6ae6505515599f3b1e945150077813d915dda /fs/kernfs | |
parent | ad9dc5df36a2253868154a22650eac882c6faec4 (diff) | |
download | linux-f7f438589f4686758ee1de99c7723919a2b05d70.tar.xz |
kernfs: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is
used. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230705190309.579783-54-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/kernfs')
-rw-r--r-- | fs/kernfs/inode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index b22b74d1a115..89a9b4dcf109 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -151,8 +151,7 @@ ssize_t kernfs_iop_listxattr(struct dentry *dentry, char *buf, size_t size) 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->i_atime = inode->i_mtime = inode_set_ctime_current(inode); } static inline void set_inode_attr(struct inode *inode, @@ -162,7 +161,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_set_ctime_to_ts(inode, attrs->ia_ctime); } static void kernfs_refresh_inode(struct kernfs_node *kn, struct inode *inode) |