Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 39b4954c authored by Liu Bo's avatar Liu Bo Committed by Shaohua Li
Browse files

badblocks: fix wrong return value in badblocks_set if badblocks are disabled



MD's rdev_set_badblocks() expects that badblocks_set() returns 1 if
badblocks are disabled, otherwise, rdev_set_badblocks() will record
superblock changes and return success in that case and md will fail to
report an IO error which it should.

This bug has existed since badblocks were introduced in commit
9e0e252a ("badblocks: Add core badblock management code").

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Acked-by: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent b90f6ff0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment