From: Christoph Hellwig Date: Mon, 19 Feb 2024 06:27:16 +0000 (+0100) Subject: xfs: use VM_NORESERVE in xfile_create X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b44c0eb8ae9c3e22cfa113774134673ac18ac848;p=linux.git 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 Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R --- diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c index 090c3ead43fdf..1cf4b239bdbbd 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)) {