proc: convert to new timestamp accessors

Convert to using the new inode timestamp accessor functions.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-59-jlayton@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Jeff Layton 2023-10-04 14:52:46 -04:00 committed by Christian Brauner
parent 4ddbd0f1fe
commit 200d942170
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
5 changed files with 5 additions and 5 deletions

View File

@ -1902,7 +1902,7 @@ struct inode *proc_pid_make_inode(struct super_block *sb,
ei = PROC_I(inode); ei = PROC_I(inode);
inode->i_mode = mode; inode->i_mode = mode;
inode->i_ino = get_next_ino(); inode->i_ino = get_next_ino();
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); simple_inode_init_ts(inode);
inode->i_op = &proc_def_inode_operations; inode->i_op = &proc_def_inode_operations;
/* /*

View File

@ -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_private = de->data;
inode->i_ino = de->low_ino; inode->i_ino = de->low_ino;
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); simple_inode_init_ts(inode);
PROC_I(inode)->pde = de; PROC_I(inode)->pde = de;
if (is_empty_pde(de)) { if (is_empty_pde(de)) {
make_empty_dir_inode(inode); make_empty_dir_inode(inode);

View File

@ -465,7 +465,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
head->count++; head->count++;
spin_unlock(&sysctl_lock); spin_unlock(&sysctl_lock);
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); simple_inode_init_ts(inode);
inode->i_mode = table->mode; inode->i_mode = table->mode;
if (!S_ISDIR(table->mode)) { if (!S_ISDIR(table->mode)) {
inode->i_mode |= S_IFREG; inode->i_mode |= S_IFREG;

View File

@ -46,7 +46,7 @@ int proc_setup_self(struct super_block *s)
struct inode *inode = new_inode(s); struct inode *inode = new_inode(s);
if (inode) { if (inode) {
inode->i_ino = self_inum; inode->i_ino = self_inum;
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); simple_inode_init_ts(inode);
inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_mode = S_IFLNK | S_IRWXUGO;
inode->i_uid = GLOBAL_ROOT_UID; inode->i_uid = GLOBAL_ROOT_UID;
inode->i_gid = GLOBAL_ROOT_GID; inode->i_gid = GLOBAL_ROOT_GID;

View File

@ -46,7 +46,7 @@ int proc_setup_thread_self(struct super_block *s)
struct inode *inode = new_inode(s); struct inode *inode = new_inode(s);
if (inode) { if (inode) {
inode->i_ino = thread_self_inum; inode->i_ino = thread_self_inum;
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); simple_inode_init_ts(inode);
inode->i_mode = S_IFLNK | S_IRWXUGO; inode->i_mode = S_IFLNK | S_IRWXUGO;
inode->i_uid = GLOBAL_ROOT_UID; inode->i_uid = GLOBAL_ROOT_UID;
inode->i_gid = GLOBAL_ROOT_GID; inode->i_gid = GLOBAL_ROOT_GID;