xfs: pass the actual offset and len to allocate to xfs_bmapi_allocate
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Apr 2024 06:15:25 +0000 (08:15 +0200)
committerChandan Babu R <chandanbabu@kernel.org>
Tue, 30 Apr 2024 04:15:19 +0000 (09:45 +0530)
commit2a9b99d45be0981536f6d3faf40ae3f58febdd49
tree86c1573899cfd8090af465584ae0f44fe64c9cb6
parent9d06960341ec5f45d3d65bdead3fbce753455e8a
xfs: pass the actual offset and len to allocate to xfs_bmapi_allocate

xfs_bmapi_allocate currently overwrites offset and len when converting
delayed allocations, and duplicates the length cap done for non-delalloc
allocations.  Move all that logic into the callers to avoid duplication
and to make the calling conventions more obvious.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/libxfs/xfs_bmap.c