[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131101135931.GA22903@redhat.com>
Date: Fri, 1 Nov 2013 09:59:31 -0400
From: Mike Snitzer <snitzer@...hat.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: Kent Overstreet <kmo@...erainc.com>, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, Alasdair Kergon <agk@...hat.com>,
Mikulas Patocka <mpatocka@...hat.com>
Subject: [PATCH for-next] dm: fix missing bi_remaining accounting
Add the missing bi_remaining increment, required by the block layer's
new bio-chaining code, to both the verity and old snapshot DM targets.
Otherwise users will hit the bi_remaining <= 0 BUG_ON in bio_endio().
Signed-off-by: Mike Snitzer <snitzer@...hat.com>
---
drivers/md/dm-snap.c | 1 +
drivers/md/dm-verity.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index b7a5053..1b4d22d 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1415,6 +1415,7 @@ out:
if (full_bio) {
full_bio->bi_end_io = pe->full_bio_end_io;
full_bio->bi_private = pe->full_bio_private;
+ atomic_inc(&full_bio->bi_remaining);
}
free_pending_exception(pe);
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c
index ac35e95..dc15857 100644
--- a/drivers/md/dm-verity.c
+++ b/drivers/md/dm-verity.c
@@ -384,6 +384,7 @@ static void verity_finish_io(struct dm_verity_io *io, int error)
bio->bi_end_io = io->orig_bi_end_io;
bio->bi_private = io->orig_bi_private;
+ atomic_inc(&bio->bi_remaining);
bio_endio(bio, error);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists