xfs: remove iomap_delta
The iomap_delta field in struct xfs_iomap just contains the difference between the offset passed to xfs_iomap and the iomap_offset. Just calculate it in the only caller that cares. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
046f1685bb
commit
9563b3d899
@@ -1512,9 +1512,11 @@ __xfs_get_blocks(
|
||||
}
|
||||
|
||||
if (direct || size > (1 << inode->i_blkbits)) {
|
||||
ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
|
||||
xfs_off_t iomap_delta = offset - iomap.iomap_offset;
|
||||
|
||||
ASSERT(iomap.iomap_bsize - iomap_delta > 0);
|
||||
offset = min_t(xfs_off_t,
|
||||
iomap.iomap_bsize - iomap.iomap_delta, size);
|
||||
iomap.iomap_bsize - iomap_delta, size);
|
||||
bh_result->b_size = (ssize_t)min_t(xfs_off_t, LONG_MAX, offset);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user