diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-10-04 20:52:34 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-10-18 14:08:23 +0200 |
commit | 2a45ac155937af24cc5677bb5e53190bcbc023bb (patch) | |
tree | ead50449b871518dcd8958a09129a5de65f5d7e4 /fs/kernfs | |
parent | jfs: convert to new timestamp accessors (diff) | |
download | linux-2a45ac155937af24cc5677bb5e53190bcbc023bb.tar.xz linux-2a45ac155937af24cc5677bb5e53190bcbc023bb.zip |
kernfs: 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-47-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/kernfs')
-rw-r--r-- | fs/kernfs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index 922719a343a7..401c084300ed 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -151,7 +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_set_ctime_current(inode); + simple_inode_init_ts(inode); } static inline void set_inode_attr(struct inode *inode, @@ -159,8 +159,8 @@ static inline void set_inode_attr(struct inode *inode, { inode->i_uid = attrs->ia_uid; inode->i_gid = attrs->ia_gid; - inode->i_atime = attrs->ia_atime; - inode->i_mtime = attrs->ia_mtime; + inode_set_atime_to_ts(inode, attrs->ia_atime); + inode_set_mtime_to_ts(inode, attrs->ia_mtime); inode_set_ctime_to_ts(inode, attrs->ia_ctime); } |