Commit 2a45ac15 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

kernfs: convert to new timestamp accessors

Convert to using the new inode timestamp accessor functions.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-47-jlayton@kernel.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent dc34d133
...@@ -151,7 +151,7 @@ ssize_t kernfs_iop_listxattr(struct dentry *dentry, char *buf, size_t size) ...@@ -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) static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
{ {
inode->i_mode = 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, static inline void set_inode_attr(struct inode *inode,
...@@ -159,8 +159,8 @@ 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_uid = attrs->ia_uid;
inode->i_gid = attrs->ia_gid; inode->i_gid = attrs->ia_gid;
inode->i_atime = attrs->ia_atime; inode_set_atime_to_ts(inode, attrs->ia_atime);
inode->i_mtime = attrs->ia_mtime; inode_set_mtime_to_ts(inode, attrs->ia_mtime);
inode_set_ctime_to_ts(inode, attrs->ia_ctime); inode_set_ctime_to_ts(inode, attrs->ia_ctime);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment