mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
autofs: 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-17-jlayton@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
562ce1f754
commit
2c11fd980a
@ -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_gid = d_inode(sb->s_root)->i_gid;
|
||||
}
|
||||
inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
|
||||
simple_inode_init_ts(inode);
|
||||
inode->i_ino = get_next_ino();
|
||||
|
||||
if (S_ISDIR(mode)) {
|
||||
|
@ -600,7 +600,7 @@ static int autofs_dir_symlink(struct mnt_idmap *idmap,
|
||||
p_ino = autofs_dentry_ino(dentry->d_parent);
|
||||
p_ino->count++;
|
||||
|
||||
dir->i_mtime = inode_set_ctime_current(dir);
|
||||
inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -633,7 +633,7 @@ static int autofs_dir_unlink(struct inode *dir, struct dentry *dentry)
|
||||
d_inode(dentry)->i_size = 0;
|
||||
clear_nlink(d_inode(dentry));
|
||||
|
||||
dir->i_mtime = inode_set_ctime_current(dir);
|
||||
inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
|
||||
|
||||
spin_lock(&sbi->lookup_lock);
|
||||
__autofs_add_expiring(dentry);
|
||||
@ -749,7 +749,7 @@ static int autofs_dir_mkdir(struct mnt_idmap *idmap,
|
||||
p_ino = autofs_dentry_ino(dentry->d_parent);
|
||||
p_ino->count++;
|
||||
inc_nlink(dir);
|
||||
dir->i_mtime = inode_set_ctime_current(dir);
|
||||
inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user