diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-10 18:33:16 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-16 21:26:33 -0700 |
commit | fad0a1ab34f777bd8a95c6cebd70ee899b6e159e (patch) | |
tree | 91a0ea2be293287a7c5c521d3cafb504e57b663d /include/linux/iomap.h | |
parent | 65dd814a6187ff46e33718d8eb76244e027837a3 (diff) | |
download | lwn-fad0a1ab34f777bd8a95c6cebd70ee899b6e159e.tar.gz lwn-fad0a1ab34f777bd8a95c6cebd70ee899b6e159e.zip |
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.h | 2 |
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; |