mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
Btrfs: process all async extents on compressed write failure
If we had an error when processing one of the async extents from our list, we were not processing the remaining async extents, meaning we would leak those async_extent structs, never release the pages with the compressed data and never unlock and clear the dirty flag from the inode's pages (those that correspond to the uncompressed content). Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
40ae837b43
commit
3d7a820f71
1 changed files with 1 additions and 5 deletions
|
@ -839,13 +839,9 @@ static noinline int submit_compressed_extents(struct inode *inode,
|
|||
}
|
||||
alloc_hint = ins.objectid + ins.offset;
|
||||
kfree(async_extent);
|
||||
if (ret)
|
||||
goto out;
|
||||
cond_resched();
|
||||
}
|
||||
ret = 0;
|
||||
out:
|
||||
return ret;
|
||||
return 0;
|
||||
out_free_reserve:
|
||||
btrfs_free_reserved_extent(root, ins.objectid, ins.offset, 1);
|
||||
out_free:
|
||||
|
|
Loading…
Reference in a new issue