diff options
-rw-r--r-- | fs/btrfs/extent_io.c | 12 | ||||
-rw-r--r-- | fs/btrfs/extent_io.h | 14 |
2 files changed, 12 insertions, 14 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 67fe401c3209..b82d244a2ef5 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -3986,18 +3986,6 @@ out: | |||
3986 | return ret; | 3986 | return ret; |
3987 | } | 3987 | } |
3988 | 3988 | ||
3989 | inline struct page *extent_buffer_page(struct extent_buffer *eb, | ||
3990 | unsigned long i) | ||
3991 | { | ||
3992 | return eb->pages[i]; | ||
3993 | } | ||
3994 | |||
3995 | inline unsigned long num_extent_pages(u64 start, u64 len) | ||
3996 | { | ||
3997 | return ((start + len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - | ||
3998 | (start >> PAGE_CACHE_SHIFT); | ||
3999 | } | ||
4000 | |||
4001 | static void __free_extent_buffer(struct extent_buffer *eb) | 3989 | static void __free_extent_buffer(struct extent_buffer *eb) |
4002 | { | 3990 | { |
4003 | #if LEAK_DEBUG | 3991 | #if LEAK_DEBUG |
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 7aeb31087f88..711d12b80028 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -282,8 +282,18 @@ void free_extent_buffer_stale(struct extent_buffer *eb); | |||
282 | int read_extent_buffer_pages(struct extent_io_tree *tree, | 282 | int read_extent_buffer_pages(struct extent_io_tree *tree, |
283 | struct extent_buffer *eb, u64 start, int wait, | 283 | struct extent_buffer *eb, u64 start, int wait, |
284 | get_extent_t *get_extent, int mirror_num); | 284 | get_extent_t *get_extent, int mirror_num); |
285 | unsigned long num_extent_pages(u64 start, u64 len); | 285 | |
286 | struct page *extent_buffer_page(struct extent_buffer *eb, unsigned long i); | 286 | static inline unsigned long num_extent_pages(u64 start, u64 len) |
287 | { | ||
288 | return ((start + len + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) - | ||
289 | (start >> PAGE_CACHE_SHIFT); | ||
290 | } | ||
291 | |||
292 | static inline struct page *extent_buffer_page(struct extent_buffer *eb, | ||
293 | unsigned long i) | ||
294 | { | ||
295 | return eb->pages[i]; | ||
296 | } | ||
287 | 297 | ||
288 | static inline void extent_buffer_get(struct extent_buffer *eb) | 298 | static inline void extent_buffer_get(struct extent_buffer *eb) |
289 | { | 299 | { |