procfs: 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: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230705190309.579783-65-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
9aa7111523
commit
e9d7d3cb9f
|
@ -1902,7 +1902,7 @@ struct inode *proc_pid_make_inode(struct super_block *sb,
|
|||
ei = PROC_I(inode);
|
||||
inode->i_mode = mode;
|
||||
inode->i_ino = get_next_ino();
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
|
||||
inode->i_op = &proc_def_inode_operations;
|
||||
|
||||
/*
|
||||
|
|
|
@ -660,7 +660,7 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
|
|||
|
||||
inode->i_private = de->data;
|
||||
inode->i_ino = de->low_ino;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
|
||||
PROC_I(inode)->pde = de;
|
||||
if (is_empty_pde(de)) {
|
||||
make_empty_dir_inode(inode);
|
||||
|
|
|
@ -463,7 +463,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
|
|||
head->count++;
|
||||
spin_unlock(&sysctl_lock);
|
||||
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
|
||||
inode->i_mode = table->mode;
|
||||
if (!S_ISDIR(table->mode)) {
|
||||
inode->i_mode |= S_IFREG;
|
||||
|
|
|
@ -46,7 +46,7 @@ int proc_setup_self(struct super_block *s)
|
|||
struct inode *inode = new_inode(s);
|
||||
if (inode) {
|
||||
inode->i_ino = self_inum;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
|
||||
inode->i_mode = S_IFLNK | S_IRWXUGO;
|
||||
inode->i_uid = GLOBAL_ROOT_UID;
|
||||
inode->i_gid = GLOBAL_ROOT_GID;
|
||||
|
|
|
@ -46,7 +46,7 @@ int proc_setup_thread_self(struct super_block *s)
|
|||
struct inode *inode = new_inode(s);
|
||||
if (inode) {
|
||||
inode->i_ino = thread_self_inum;
|
||||
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
|
||||
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
|
||||
inode->i_mode = S_IFLNK | S_IRWXUGO;
|
||||
inode->i_uid = GLOBAL_ROOT_UID;
|
||||
inode->i_gid = GLOBAL_ROOT_GID;
|
||||
|
|
Loading…
Reference in New Issue