summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-03-01 18:20:27 +0100
committerDavid Sterba <dsterba@suse.com>2018-08-06 13:12:44 +0200
commitcc5e31a4775d0d6b98139fdee51868a270bda42f (patch)
tree3ac26d8b0b1a020ca417c61c37b910cd7ca39e09 /fs/btrfs/extent_io.h
parent8791d43207966f40d8ffba18c663514aca5a6f3e (diff)
downloadlinux-cc5e31a4775d0d6b98139fdee51868a270bda42f.tar.bz2
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 <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h2
1 files changed, 1 insertions, 1 deletions
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);