aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2023-06-14 14:49:35 +0800
committerDavid Sterba <[email protected]>2023-06-14 18:30:30 +0200
commitb50f2d048ecf1512ff85128ea4153bceb0e60590 (patch)
treea51ed8bd7c4196fc7297b00a90674cf0677940bd /lib/mpi/mpi-bit.c
parent745806fb4554f334e6406fa82b328562aa48f08f (diff)
btrfs: scrub: fix a return value overwrite in scrub_stripe()
[RETURN VALUE OVERWRITE] Inside scrub_stripe(), we would submit all the remaining stripes after iterating all extents. But since flush_scrub_stripes() can return error, we need to avoid overwriting the existing @ret if there is any error. However the existing check is doing the wrong check: ret2 = flush_scrub_stripes(); if (!ret2) ret = ret2; This would overwrite the existing @ret to 0 as long as the final flush detects no critical errors. [FIX] We should check @ret other than @ret2 in that case. Fixes: 8eb3dd17eadd ("btrfs: dev-replace: error out if we have unrepaired metadata error during") Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions