diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index aaee3ef55ed8..75533adef998 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -5342,6 +5342,11 @@ int read_extent_buffer_to_user(struct extent_buffer *eb, void __user *dstv, | |||
5342 | return ret; | 5342 | return ret; |
5343 | } | 5343 | } |
5344 | 5344 | ||
5345 | /* | ||
5346 | * return 0 if the item is found within a page. | ||
5347 | * return 1 if the item spans two pages. | ||
5348 | * return -EINVAL otherwise. | ||
5349 | */ | ||
5345 | int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, | 5350 | int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, |
5346 | unsigned long min_len, char **map, | 5351 | unsigned long min_len, char **map, |
5347 | unsigned long *map_start, | 5352 | unsigned long *map_start, |
@@ -5356,7 +5361,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, | |||
5356 | PAGE_SHIFT; | 5361 | PAGE_SHIFT; |
5357 | 5362 | ||
5358 | if (i != end_i) | 5363 | if (i != end_i) |
5359 | return -EINVAL; | 5364 | return 1; |
5360 | 5365 | ||
5361 | if (i == 0) { | 5366 | if (i == 0) { |
5362 | offset = start_offset; | 5367 | offset = start_offset; |