mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
btrfs: Free checksum list on scrub_extent() fail
When scrub_extent() failed, we need to free previois created checksum list. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
f2f66a2f88
commit
6fa96d72f7
1 changed files with 6 additions and 2 deletions
|
@ -2924,10 +2924,12 @@ static noinline_for_stack int scrub_raid56_parity(struct scrub_ctx *sctx,
|
|||
extent_dev, flags,
|
||||
generation,
|
||||
extent_mirror_num);
|
||||
|
||||
scrub_free_csums(sctx);
|
||||
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
scrub_free_csums(sctx);
|
||||
if (extent_logical + extent_len <
|
||||
key.objectid + bytes) {
|
||||
logic_start += map->stripe_len;
|
||||
|
@ -3262,10 +3264,12 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
|
|||
extent_physical, extent_dev, flags,
|
||||
generation, extent_mirror_num,
|
||||
extent_logical - logical + physical);
|
||||
|
||||
scrub_free_csums(sctx);
|
||||
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
scrub_free_csums(sctx);
|
||||
if (extent_logical + extent_len <
|
||||
key.objectid + bytes) {
|
||||
if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
|
||||
|
|
Loading…
Reference in a new issue