diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0fa7cf227f1a..a8ae68c6fbb8 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -306,6 +306,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset, | |||
306 | u64 physical; | 306 | u64 physical; |
307 | u64 length = 0; | 307 | u64 length = 0; |
308 | u64 map_length; | 308 | u64 map_length; |
309 | int total_devs; | ||
309 | struct bio_vec *bvec; | 310 | struct bio_vec *bvec; |
310 | int i; | 311 | int i; |
311 | int ret; | 312 | int ret; |
@@ -315,7 +316,8 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset, | |||
315 | } | 316 | } |
316 | map_tree = &root->fs_info->mapping_tree; | 317 | map_tree = &root->fs_info->mapping_tree; |
317 | map_length = length; | 318 | map_length = length; |
318 | ret = btrfs_map_block(map_tree, logical, &physical, &map_length, &dev); | 319 | ret = btrfs_map_block(map_tree, READ, 0, logical, &physical, |
320 | &map_length, &dev, &total_devs); | ||
319 | if (map_length < length + size) { | 321 | if (map_length < length + size) { |
320 | return 1; | 322 | return 1; |
321 | } | 323 | } |