summaryrefslogtreecommitdiff
path: root/include/linux/iomap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-11 04:33:16 +0300
committerDarrick J. Wong <djwong@kernel.org>2021-08-17 07:26:33 +0300
commitfad0a1ab34f777bd8a95c6cebd70ee899b6e159e (patch)
tree91a0ea2be293287a7c5c521d3cafb504e57b663d /include/linux/iomap.h
parent65dd814a6187ff46e33718d8eb76244e027837a3 (diff)
downloadlinux-fad0a1ab34f777bd8a95c6cebd70ee899b6e159e.tar.xz
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>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r--include/linux/iomap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index f53c40e9d799..24f8489583ca 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -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;