mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
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 <hughd@google.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
This commit is contained in:
committed by
Chandan Babu R
parent
9d8b367449
commit
b44c0eb8ae
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user