summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2022-11-29 09:09:17 +1100
committerDave Chinner <david@fromorbit.com>2022-11-29 09:09:17 +1100
commit7348b322332d8602a4133f0b861334ea021b134a (patch)
tree18d599bcc69fd8670bd7e1cf44acedf6770fa14e /fs/xfs/xfs_iomap.c
parentf43dc4dc3eff028b5ddddd99f3a66c5a6bdd4e78 (diff)
downloadlinux-stable-7348b322332d8602a4133f0b861334ea021b134a.tar.gz
linux-stable-7348b322332d8602a4133f0b861334ea021b134a.tar.bz2
linux-stable-7348b322332d8602a4133f0b861334ea021b134a.zip
xfs: xfs_bmap_punch_delalloc_range() should take a byte range
All the callers of xfs_bmap_punch_delalloc_range() jump through hoops to convert a byte range to filesystem blocks before calling xfs_bmap_punch_delalloc_range(). Instead, pass the byte range to xfs_bmap_punch_delalloc_range() and have it do the conversion to filesystem blocks internally. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r--fs/xfs/xfs_iomap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index ea96e8a34868..09676ff6940e 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -1126,12 +1126,8 @@ xfs_buffered_write_delalloc_punch(
loff_t offset,
loff_t length)
{
- struct xfs_mount *mp = XFS_M(inode->i_sb);
- xfs_fileoff_t start_fsb = XFS_B_TO_FSBT(mp, offset);
- xfs_fileoff_t end_fsb = XFS_B_TO_FSB(mp, offset + length);
-
- return xfs_bmap_punch_delalloc_range(XFS_I(inode), start_fsb,
- end_fsb - start_fsb);
+ return xfs_bmap_punch_delalloc_range(XFS_I(inode), offset,
+ offset + length);
}
static int