aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2024-02-19 07:27:16 +0100
committerChandan Babu R <[email protected]>2024-02-21 11:36:51 +0530
commitb44c0eb8ae9c3e22cfa113774134673ac18ac848 (patch)
treeca470efa64b577dd6513f23bfc24e2c1350ef812
parent9d8b36744935f83c5553e6f242b9961f676628ed (diff)
xfs: use VM_NORESERVE in xfile_create
xfile_create creates a (potentially large) sparse file. Pass VM_NORESERVE to shmem_file_setup to not account for the entire file size at file creation time. Reported-by: Hugh Dickins <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
-rw-r--r--fs/xfs/scrub/xfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c
index 090c3ead43fd..1cf4b239bdbb 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, 0);
+ xf->file = shmem_file_setup(description, isize, VM_NORESERVE);
if (!xf->file)
goto out_xfile;
if (IS_ERR(xf->file)) {