OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65ad010
)
btrfs: use round_up wrapper in num_extent_pages
author
David Sterba
<dsterba@suse.com>
Wed, 4 Jul 2018 15:49:31 +0000
(17:49 +0200)
committer
David Sterba
<dsterba@suse.com>
Mon, 6 Aug 2018 11:12:44 +0000
(13:12 +0200)
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.h
patch
|
blob
|
history
diff --git
a/fs/btrfs/extent_io.h
b/fs/btrfs/extent_io.h
index
d8382a4
..
7a3c15b
100644
(file)
--- 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)