diff options
author | David Sterba <dsterba@suse.com> | 2018-07-04 17:49:31 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:12:44 +0200 |
commit | 8791d43207966f40d8ffba18c663514aca5a6f3e (patch) | |
tree | 70e31842be252a1c45e81bb059dee0da09e4f198 /fs/btrfs/extent_io.h | |
parent | 65ad010488a5cc0f123a9924f7ad26a1b3f6a4f6 (diff) | |
download | linux-stable-8791d43207966f40d8ffba18c663514aca5a6f3e.tar.gz linux-stable-8791d43207966f40d8ffba18c663514aca5a6f3e.tar.bz2 linux-stable-8791d43207966f40d8ffba18c663514aca5a6f3e.zip |
btrfs: use round_up wrapper in num_extent_pages
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index d8382a4a7f46..7a3c15b55f2b 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -442,8 +442,8 @@ void wait_on_extent_buffer_writeback(struct extent_buffer *eb); static inline unsigned long num_extent_pages(const struct extent_buffer *eb) { - return ((eb->start + eb->len + PAGE_SIZE - 1) >> PAGE_SHIFT) - - (eb->start >> PAGE_SHIFT); + return (round_up(eb->start + eb->len, PAGE_SIZE) >> PAGE_SHIFT) - + (eb->start >> PAGE_SHIFT); } static inline void extent_buffer_get(struct extent_buffer *eb) |