aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-02-19 07:27:18 +0100
committerChandan Babu R <chandanbabu@kernel.org>2024-02-21 11:36:52 +0530
commitefc9dc096399c692bd258ec9cdbe6b868a59545a (patch)
tree6b25763fe4c9c3e04f720b569655fbd924be5fe4 /fs/xfs
parent1b07ea2ab3dc0307f80c735cba8c3ef690bd9aab (diff)
downloadlinux-efc9dc096399c692bd258ec9cdbe6b868a59545a.tar.gz
xfs: use shmem_kernel_file_setup in xfile_create
shmem_kernel_file_setup is equivalent to shmem_file_setup except that it already sets the S_PRIVATE flag. Use it instead of open coding the logic. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/scrub/xfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c
index e649558351bc5..99a2b48f5662e 100644
--- a/fs/xfs/scrub/xfile.c
+++ b/fs/xfs/scrub/xfile.c
@@ -68,7 +68,7 @@ xfile_create(
if (!xf)
return -ENOMEM;
- xf->file = shmem_file_setup(description, isize, VM_NORESERVE);
+ xf->file = shmem_kernel_file_setup(description, isize, VM_NORESERVE);
if (IS_ERR(xf->file)) {
error = PTR_ERR(xf->file);
goto out_xfile;
@@ -85,7 +85,7 @@ xfile_create(
FMODE_LSEEK;
xf->file->f_flags |= O_RDWR | O_LARGEFILE | O_NOATIME;
inode = file_inode(xf->file);
- inode->i_flags |= S_PRIVATE | S_NOCMTIME | S_NOATIME;
+ inode->i_flags |= S_NOCMTIME | S_NOATIME;
inode->i_mode &= ~0177;
inode->i_uid = GLOBAL_ROOT_UID;
inode->i_gid = GLOBAL_ROOT_GID;