From cc5e31a4775d0d6b98139fdee51868a270bda42f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 1 Mar 2018 18:20:27 +0100 Subject: btrfs: switch types to int when counting eb pages The loops iterating eb pages use unsigned long, that's an overkill as we know that there are at most 16 pages (64k / 4k), and 4 by default (with nodesize 16k). Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba --- fs/btrfs/extent_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/extent_io.h') diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 7a3c15b55f2b..48f1ee9ad379 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -440,7 +440,7 @@ int read_extent_buffer_pages(struct extent_io_tree *tree, int mirror_num); void wait_on_extent_buffer_writeback(struct extent_buffer *eb); -static inline unsigned long num_extent_pages(const struct extent_buffer *eb) +static inline int num_extent_pages(const struct extent_buffer *eb) { return (round_up(eb->start + eb->len, PAGE_SIZE) >> PAGE_SHIFT) - (eb->start >> PAGE_SHIFT); -- cgit v1.2.3