Skip to content

Commit

Permalink
Merge tag 'xfs-5.16-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/x…
Browse files Browse the repository at this point in the history
…fs-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
  • Loading branch information
Linus Torvalds committed Jan 8, 2022
2 parents d1587f7 + 983d8e6 commit 622e42a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 622e42a

Please sign in to comment.