Commit 622e42a6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xfs-5.16-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fix from Darrick Wong:

 - Make the old ALLOCSP ioctl behave in a consistent manner with newer
   syscalls like fallocate.

* tag 'xfs-5.16-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
parents d1587f7b 983d8e60
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -687,7 +687,8 @@ xfs_ioc_space(

	if (bf->l_start > XFS_ISIZE(ip)) {
		error = xfs_alloc_file_space(ip, XFS_ISIZE(ip),
				bf->l_start - XFS_ISIZE(ip), 0);
				bf->l_start - XFS_ISIZE(ip),
				XFS_BMAPI_PREALLOC);
		if (error)
			goto out_unlock;
	}