|
@@ -953,6 +953,7 @@ static int cow_file_range_async(struct inode *inode, struct page *locked_page,
|
|
|
1, 0, NULL, GFP_NOFS);
|
|
|
while (start < end) {
|
|
|
async_cow = kmalloc(sizeof(*async_cow), GFP_NOFS);
|
|
|
+ BUG_ON(!async_cow);
|
|
|
async_cow->inode = inode;
|
|
|
async_cow->root = root;
|
|
|
async_cow->locked_page = locked_page;
|
|
@@ -5001,6 +5002,8 @@ static noinline int uncompress_inline(struct btrfs_path *path,
|
|
|
inline_size = btrfs_file_extent_inline_item_len(leaf,
|
|
|
btrfs_item_nr(leaf, path->slots[0]));
|
|
|
tmp = kmalloc(inline_size, GFP_NOFS);
|
|
|
+ if (!tmp)
|
|
|
+ return -ENOMEM;
|
|
|
ptr = btrfs_file_extent_inline_start(item);
|
|
|
|
|
|
read_extent_buffer(leaf, tmp, ptr, inline_size);
|