iomap: constify iomap_iter_srcmap

The srcmap returned from iomap_iter_srcmap is never modified, so mark
the iomap returned from it const and constify a lot of code that never
modifies the iomap.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
Christoph Hellwig
2021-08-10 18:33:16 -07:00
committed by Darrick J. Wong
parent 65dd814a61
commit fad0a1ab34
2 changed files with 20 additions and 20 deletions

View File

@@ -211,7 +211,7 @@ static inline u64 iomap_length(const struct iomap_iter *iter)
* for a given operation, which may or may no be identical to the destination
* map in &i->iomap.
*/
static inline struct iomap *iomap_iter_srcmap(struct iomap_iter *i)
static inline const struct iomap *iomap_iter_srcmap(const struct iomap_iter *i)
{
if (i->srcmap.type != IOMAP_HOLE)
return &i->srcmap;