Commit 36aa5eae authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

autofs: 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.
Reviewed-by: default avatarIan Kent <raven@themaw.net>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Message-Id: <20230705190309.579783-24-jlayton@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 2276e5ba
...@@ -370,7 +370,7 @@ struct inode *autofs_get_inode(struct super_block *sb, umode_t mode) ...@@ -370,7 +370,7 @@ struct inode *autofs_get_inode(struct super_block *sb, umode_t mode)
inode->i_uid = d_inode(sb->s_root)->i_uid; inode->i_uid = d_inode(sb->s_root)->i_uid;
inode->i_gid = d_inode(sb->s_root)->i_gid; inode->i_gid = d_inode(sb->s_root)->i_gid;
} }
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
inode->i_ino = get_next_ino(); inode->i_ino = get_next_ino();
if (S_ISDIR(mode)) { if (S_ISDIR(mode)) {
......
...@@ -600,7 +600,7 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap, ...@@ -600,7 +600,7 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap,
p_ino = autofs_dentry_ino(dentry->d_parent); p_ino = autofs_dentry_ino(dentry->d_parent);
p_ino->count++; p_ino->count++;
dir->i_mtime = dir->i_ctime = current_time(dir); dir->i_mtime = inode_set_ctime_current(dir);
return 0; return 0;
} }
...@@ -633,7 +633,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry) ...@@ -633,7 +633,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry)
d_inode(dentry)->i_size = 0; d_inode(dentry)->i_size = 0;
clear_nlink(d_inode(dentry)); clear_nlink(d_inode(dentry));
dir->i_mtime = dir->i_ctime = current_time(dir); dir->i_mtime = inode_set_ctime_current(dir);
spin_lock(&sbi->lookup_lock); spin_lock(&sbi->lookup_lock);
__autofs_add_expiring(dentry); __autofs_add_expiring(dentry);
...@@ -749,7 +749,7 @@ static int autofs_dir_mkdir(struct mnt_idmap *idmap, ...@@ -749,7 +749,7 @@ static int autofs_dir_mkdir(struct mnt_idmap *idmap,
p_ino = autofs_dentry_ino(dentry->d_parent); p_ino = autofs_dentry_ino(dentry->d_parent);
p_ino->count++; p_ino->count++;
inc_nlink(dir); inc_nlink(dir);
dir->i_mtime = dir->i_ctime = current_time(dir); dir->i_mtime = inode_set_ctime_current(dir);
return 0; return 0;
} }
......
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