diff mbox series

[09/11] btrfs: make extent_map_end() argument const

Message ID 231f120d97670f5a5fbd137e301ad076329ec1c5.1701706418.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: some cleanups and optimizations for extent maps | expand

Commit Message

Filipe Manana Dec. 4, 2023, 4:20 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

The extent map pointer argument for extent_map_end() can be const as we
are not modifyng anything in the extent map. So make it const, as it will
allow further changes to callers that have a const extent map pointer.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent_map.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h
index cd1a9115908d..44dc0cb310ea 100644
--- a/fs/btrfs/extent_map.h
+++ b/fs/btrfs/extent_map.h
@@ -64,7 +64,7 @@  static inline int extent_map_in_tree(const struct extent_map *em)
 	return !RB_EMPTY_NODE(&em->rb_node);
 }
 
-static inline u64 extent_map_end(struct extent_map *em)
+static inline u64 extent_map_end(const struct extent_map *em)
 {
 	if (em->start + em->len < em->start)
 		return (u64)-1;