[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1407930571-26532-1-git-send-email-sagig@mellanox.com>
Date: Wed, 13 Aug 2014 14:49:31 +0300
From: Sagi Grimberg <sagig@...lanox.com>
To: axboe@...nel.dk, martin.petersen@...cle.com
Cc: kmo@...erainc.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...lanox.com>
---
block/bio-integrity.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 9e24106..90d40f9 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -526,7 +526,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;
}
--
1.7.1
--
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