|
@@ -1018,8 +1018,10 @@ static noinline int cow_file_range(struct inode *inode,
|
|
ram_size, /* ram_bytes */
|
|
ram_size, /* ram_bytes */
|
|
BTRFS_COMPRESS_NONE, /* compress_type */
|
|
BTRFS_COMPRESS_NONE, /* compress_type */
|
|
BTRFS_ORDERED_REGULAR /* type */);
|
|
BTRFS_ORDERED_REGULAR /* type */);
|
|
- if (IS_ERR(em))
|
|
|
|
|
|
+ if (IS_ERR(em)) {
|
|
|
|
+ ret = PTR_ERR(em);
|
|
goto out_reserve;
|
|
goto out_reserve;
|
|
|
|
+ }
|
|
free_extent_map(em);
|
|
free_extent_map(em);
|
|
|
|
|
|
ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
|
|
ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
|