mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
hfsplus: 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. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230705190309.579783-47-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
7305586a79
commit
101fa821ab
@@ -312,7 +312,7 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir,
|
||||
dir->i_size++;
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
hfsplus_subfolders_inc(dir);
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
dir->i_mtime = inode_set_ctime_current(dir);
|
||||
hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
|
||||
|
||||
hfs_find_exit(&fd);
|
||||
@@ -417,7 +417,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, const struct qstr *str)
|
||||
dir->i_size--;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_dec(dir);
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
dir->i_mtime = inode_set_ctime_current(dir);
|
||||
hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
|
||||
|
||||
if (type == HFSPLUS_FILE || type == HFSPLUS_FOLDER) {
|
||||
@@ -494,7 +494,7 @@ int hfsplus_rename_cat(u32 cnid,
|
||||
dst_dir->i_size++;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_inc(dst_dir);
|
||||
dst_dir->i_mtime = dst_dir->i_ctime = current_time(dst_dir);
|
||||
dst_dir->i_mtime = inode_set_ctime_current(dst_dir);
|
||||
|
||||
/* finally remove the old entry */
|
||||
err = hfsplus_cat_build_key(sb, src_fd.search_key,
|
||||
@@ -511,7 +511,7 @@ int hfsplus_rename_cat(u32 cnid,
|
||||
src_dir->i_size--;
|
||||
if (type == HFSPLUS_FOLDER)
|
||||
hfsplus_subfolders_dec(src_dir);
|
||||
src_dir->i_mtime = src_dir->i_ctime = current_time(src_dir);
|
||||
src_dir->i_mtime = inode_set_ctime_current(src_dir);
|
||||
|
||||
/* remove old thread entry */
|
||||
hfsplus_cat_build_key_with_cnid(sb, src_fd.search_key, cnid);
|
||||
|
||||
Reference in New Issue
Block a user