]> Git Repo - linux.git/blobdiff - fs/hugetlbfs/inode.c
Merge tag 'mm-stable-2023-11-01-14-33' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / fs / hugetlbfs / inode.c
index 3ad5fc3cb8db40ba7853e73af4cc398ee390445a..54b3d489b6a7a52f7f876632dff55da6c5fc89c8 100644 (file)
@@ -955,7 +955,7 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb,
                inode->i_mode = S_IFDIR | ctx->mode;
                inode->i_uid = ctx->uid;
                inode->i_gid = ctx->gid;
-               inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
+               simple_inode_init_ts(inode);
                inode->i_op = &hugetlbfs_dir_inode_operations;
                inode->i_fop = &simple_dir_operations;
                /* directory inodes start off with i_nlink == 2 (for "." entry) */
@@ -999,7 +999,7 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
                lockdep_set_class(&inode->i_mapping->i_mmap_rwsem,
                                &hugetlbfs_i_mmap_rwsem_key);
                inode->i_mapping->a_ops = &hugetlbfs_aops;
-               inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
+               simple_inode_init_ts(inode);
                inode->i_mapping->private_data = resv_map;
                info->seals = F_SEAL_SEAL;
                switch (mode & S_IFMT) {
@@ -1042,7 +1042,7 @@ static int hugetlbfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
        inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev);
        if (!inode)
                return -ENOSPC;
-       dir->i_mtime = inode_set_ctime_current(dir);
+       inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
        d_instantiate(dentry, inode);
        dget(dentry);/* Extra count - pin the dentry in core */
        return 0;
@@ -1074,7 +1074,7 @@ static int hugetlbfs_tmpfile(struct mnt_idmap *idmap,
        inode = hugetlbfs_get_inode(dir->i_sb, dir, mode | S_IFREG, 0);
        if (!inode)
                return -ENOSPC;
-       dir->i_mtime = inode_set_ctime_current(dir);
+       inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
        d_tmpfile(file, inode);
        return finish_open_simple(file, 0);
 }
@@ -1096,7 +1096,7 @@ static int hugetlbfs_symlink(struct mnt_idmap *idmap,
                } else
                        iput(inode);
        }
-       dir->i_mtime = inode_set_ctime_current(dir);
+       inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
 
        return error;
 }
This page took 0.035042 seconds and 4 git commands to generate.