提交 6fa96d72 编写于 作者: Z Zhao Lei 提交者: Chris Mason

btrfs: Free checksum list on scrub_extent() fail

When scrub_extent() failed, we need to free previois created
checksum list.
Signed-off-by: NZhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 f2f66a2f
...@@ -2924,10 +2924,12 @@ static noinline_for_stack int scrub_raid56_parity(struct scrub_ctx *sctx, ...@@ -2924,10 +2924,12 @@ static noinline_for_stack int scrub_raid56_parity(struct scrub_ctx *sctx,
extent_dev, flags, extent_dev, flags,
generation, generation,
extent_mirror_num); extent_mirror_num);
scrub_free_csums(sctx);
if (ret) if (ret)
goto out; goto out;
scrub_free_csums(sctx);
if (extent_logical + extent_len < if (extent_logical + extent_len <
key.objectid + bytes) { key.objectid + bytes) {
logic_start += map->stripe_len; logic_start += map->stripe_len;
...@@ -3262,10 +3264,12 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, ...@@ -3262,10 +3264,12 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
extent_physical, extent_dev, flags, extent_physical, extent_dev, flags,
generation, extent_mirror_num, generation, extent_mirror_num,
extent_logical - logical + physical); extent_logical - logical + physical);
scrub_free_csums(sctx);
if (ret) if (ret)
goto out; goto out;
scrub_free_csums(sctx);
if (extent_logical + extent_len < if (extent_logical + extent_len <
key.objectid + bytes) { key.objectid + bytes) {
if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) { if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册