iomap: move the iomap_sector sector calculation out of iomap_add_to_ioend
authorChristoph Hellwig <hch@lst.de>
Thu, 7 Dec 2023 07:27:04 +0000 (08:27 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 1 Feb 2024 13:20:12 +0000 (14:20 +0100)
commitdec3a7b3aa45802e70c350d73e11564cd444e448
tree4a28b2f37fd5b57b29b6ee13460393bfd0d64644
parent7edfc610ec315de96963e66889511212ad87e3de
iomap: move the iomap_sector sector calculation out of iomap_add_to_ioend

The calculation in iomap_sector is pretty trivial and most of the time
iomap_add_to_ioend only callers either iomap_can_add_to_ioend or
iomap_alloc_ioend from a single invocation.

Calculate the sector in the two lower level functions and stop passing it
from iomap_add_to_ioend and update the iomap_alloc_ioend argument passing
order to match that of iomap_add_to_ioend.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231207072710.176093-9-hch@lst.de
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c