summaryrefslogtreecommitdiffstats
path: root/block/bio-integrity.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-08-13 13:49:31 +0200
committerJens Axboe <axboe@fb.com>2014-08-22 03:37:47 +0200
commit16f408dc6b1c87f5e3a767626df09c1399c6bf70 (patch)
tree03aefafe7a02a7778af7b44e326f12c4521905ff /block/bio-integrity.c
parentblk-mq: don't allow merges if turned off for the queue (diff)
downloadlinux-16f408dc6b1c87f5e3a767626df09c1399c6bf70.tar.xz
linux-16f408dc6b1c87f5e3a767626df09c1399c6bf70.zip
block: Fix BUG_ON when pi errors occur
When getting a pi error we get to bio_integrity_end_io with bi_remaining already decremented to 0 where we will eventually need to call bio_endio with restored original bio completion handler. Calling bio_endio invokes a BUG_ON(). We should call bio_endio_nodec instead, like what is done in bio_integrity_verify_fn. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r--block/bio-integrity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index bc423f7b02da..f14b4abbebd8 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -520,7 +520,7 @@ void bio_integrity_endio(struct bio *bio, int error)
*/
if (error) {
bio->bi_end_io = bip->bip_end_io;
- bio_endio(bio, error);
+ bio_endio_nodec(bio, error);
return;
}