Commit 6d0c1b68 authored by Jeff Layton's avatar Jeff Layton Committed by Christian Brauner

ramfs: convert to new timestamp accessors

Convert to using the new inode timestamp accessor functions.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20231004185347.80880-63-jlayton@kernel.orgSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent c2c08f3f
......@@ -65,7 +65,7 @@ struct inode *ramfs_get_inode(struct super_block *sb,
inode->i_mapping->a_ops = &ram_aops;
mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER);
mapping_set_unevictable(inode->i_mapping);
inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
simple_inode_init_ts(inode);
switch (mode & S_IFMT) {
default:
init_special_inode(inode, mode, dev);
......@@ -105,7 +105,7 @@ ramfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
d_instantiate(dentry, inode);
dget(dentry); /* Extra count - pin the dentry in core */
error = 0;
dir->i_mtime = inode_set_ctime_current(dir);
inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
}
return error;
}
......@@ -138,7 +138,8 @@ static int ramfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
if (!error) {
d_instantiate(dentry, inode);
dget(dentry);
dir->i_mtime = inode_set_ctime_current(dir);
inode_set_mtime_to_ts(dir,
inode_set_ctime_current(dir));
} else
iput(inode);
}
......
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