So, this code clearly isn't getting tested - at all. Besides this bug,
the parsing for the "corrupt" modes is also broken.

Guys, don't push broken crap, and figure out how to write some tests.

-- >8 --

Cc: dm-devel@lists.linux.dev
Cc: Mikulas Patocka <mpato...@redhat.com>
Cc: Mike Snitzer <snit...@kernel.org>
Cc: Alasdair Kergon <a...@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstr...@linux.dev>
---
 drivers/md/dm-flakey.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c
index 731467d4ed10..5ceb5d68f65c 100644
--- a/drivers/md/dm-flakey.c
+++ b/drivers/md/dm-flakey.c
@@ -426,7 +430,7 @@ static struct bio *clone_bio(struct dm_target *ti, struct 
flakey_c *fc, struct b
        if (!clone)
                return NULL;
 
-       bio_init(clone, fc->dev->bdev, bio->bi_inline_vecs, nr_iovecs, 
bio->bi_opf);
+       bio_init(clone, fc->dev->bdev, clone->bi_inline_vecs, nr_iovecs, 
bio->bi_opf);
 
        clone->bi_iter.bi_sector = flakey_map_sector(ti, 
bio->bi_iter.bi_sector);
        clone->bi_private = bio;
-- 
2.47.2


Reply via email to