Skip to content

Commit

Permalink
btrfs: use round_up wrapper in num_extent_pages
Browse files Browse the repository at this point in the history
Reviewed-by: Nikolay Borisov <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Aug 6, 2018
1 parent 65ad010 commit 8791d43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/extent_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8791d43

Please sign in to comment.