X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Fbtrfs%2Ffile-item.c;h=b910694f61ed25bbf0f309ff673381afcf0994d8;hb=f385b6974bf93cd4335495437a6ee82fa5237df7;hp=08bcfa92a2226bcfd3ba0edf6fe8eb944454612b;hpb=1d3fe4a75b691285cded47c9f1a91b30d25287b0;p=mirror_ubuntu-bionic-kernel.git 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, 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;