mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
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:
parent
4ddbd0f1fe
commit
200d942170
@ -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_set_ctime_current(inode);
|
||||
simple_inode_init_ts(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_set_ctime_current(inode);
|
||||
simple_inode_init_ts(inode);
|
||||
PROC_I(inode)->pde = de;
|
||||
if (is_empty_pde(de)) {
|
||||
make_empty_dir_inode(inode);
|
||||
|
@ -465,7 +465,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_set_ctime_current(inode);
|
||||
simple_inode_init_ts(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_set_ctime_current(inode);
|
||||
simple_inode_init_ts(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_set_ctime_current(inode);
|
||||
simple_inode_init_ts(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
Block a user