diff options
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r-- | fs/btrfs/file-item.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 08bcfa92a222..b910694f61ed 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -291,7 +291,8 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, | |||
291 | u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); | 291 | u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy); |
292 | 292 | ||
293 | path = btrfs_alloc_path(); | 293 | path = btrfs_alloc_path(); |
294 | BUG_ON(!path); | 294 | if (!path) |
295 | return -ENOMEM; | ||
295 | 296 | ||
296 | if (search_commit) { | 297 | if (search_commit) { |
297 | path->skip_locking = 1; | 298 | path->skip_locking = 1; |
@@ -677,7 +678,9 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, | |||
677 | btrfs_super_csum_size(&root->fs_info->super_copy); | 678 | btrfs_super_csum_size(&root->fs_info->super_copy); |
678 | 679 | ||
679 | path = btrfs_alloc_path(); | 680 | path = btrfs_alloc_path(); |
680 | BUG_ON(!path); | 681 | if (!path) |
682 | return -ENOMEM; | ||
683 | |||
681 | sector_sum = sums->sums; | 684 | sector_sum = sums->sums; |
682 | again: | 685 | again: |
683 | next_offset = (u64)-1; | 686 | next_offset = (u64)-1; |