diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-07-05 21:01:21 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-07-24 10:30:01 +0200 |
commit | f7f438589f4686758ee1de99c7723919a2b05d70 (patch) | |
tree | eee6ae6505515599f3b1e945150077813d915dda /fs/minix/namei.c | |
parent | jfs: convert to ctime accessor functions (diff) | |
download | linux-f7f438589f4686758ee1de99c7723919a2b05d70.tar.xz linux-f7f438589f4686758ee1de99c7723919a2b05d70.zip |
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/minix/namei.c')
-rw-r--r-- | fs/minix/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 956d5183828d..114084d5636a 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c @@ -98,7 +98,7 @@ static int minix_link(struct dentry * old_dentry, struct inode * dir, { struct inode *inode = d_inode(old_dentry); - inode->i_ctime = current_time(inode); + inode_set_ctime_current(inode); inode_inc_link_count(inode); ihold(inode); return add_nondir(dentry, inode); @@ -154,7 +154,7 @@ static int minix_unlink(struct inode * dir, struct dentry *dentry) if (err) return err; - inode->i_ctime = dir->i_ctime; + inode_set_ctime_to_ts(inode, inode_get_ctime(dir)); inode_dec_link_count(inode); return 0; } @@ -218,7 +218,7 @@ static int minix_rename(struct mnt_idmap *idmap, put_page(new_page); if (err) goto out_dir; - new_inode->i_ctime = current_time(new_inode); + inode_set_ctime_current(new_inode); if (dir_de) drop_nlink(new_inode); inode_dec_link_count(new_inode); |