Message ID | 20230428085020.2283981-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 f34351b59414..11e3a3ae2c72 100644 --- a/block/badblocks.c +++ b/block/badblocks.c @@ -320,6 +320,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; } }