]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/btrfs/file-item.c
Merge branch '3.1-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab...
[mirror_ubuntu-bionic-kernel.git] / fs / btrfs / file-item.c
index 08bcfa92a2226bcfd3ba0edf6fe8eb944454612b..b910694f61ed25bbf0f309ff673381afcf0994d8 100644 (file)
@@ -291,7 +291,8 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
        u16 csum_size = btrfs_super_csum_size(&root->fs_info->super_copy);
 
        path = btrfs_alloc_path();
-       BUG_ON(!path);
+       if (!path)
+               return -ENOMEM;
 
        if (search_commit) {
                path->skip_locking = 1;
@@ -677,7 +678,9 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
                btrfs_super_csum_size(&root->fs_info->super_copy);
 
        path = btrfs_alloc_path();
-       BUG_ON(!path);
+       if (!path)
+               return -ENOMEM;
+
        sector_sum = sums->sums;
 again:
        next_offset = (u64)-1;