diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-08 19:56:47 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-08 19:56:47 +0100 |
commit | 622e42a674641214034001767334893e2afaeba8 (patch) | |
tree | 5785e32c5d4fe120ff3720b03063784a9acc98a8 | |
parent | Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate (diff) | |
download | linux-622e42a674641214034001767334893e2afaeba8.tar.xz linux-622e42a674641214034001767334893e2afaeba8.zip |
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
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 174cd8950cb6..bc85e045845d 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -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; } |