Message ID | 20230626080913.3493135-5-linan666@huaweicloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block/badblocks: fix badblocks setting error | expand |
diff --git a/block/badblocks.c b/block/badblocks.c index c1745b76d8f1..b79d37a4bf0e 100644 --- a/block/badblocks.c +++ b/block/badblocks.c @@ -301,6 +301,7 @@ int badblocks_set(struct badblocks *bb, sector_t s, int sectors, p[hi] = BB_MAKE(s, this_sectors, acknowledged); sectors -= this_sectors; s += this_sectors; + hi++; changed = true; } }