[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH 1/4] dm core: use BUG_ON in dm_end_request()



This patch replaces free_bio_clone() in dm_end_request() with BUG_ON().

free_bio_clone() was there to clean up clone.  However it is
definitely a bug if clone still has bios in dm_end_request().
So use BUG_ON() instead.

Signed-off-by: Kiyoshi Ueda <k-ueda ct jp nec com>
Signed-off-by: Jun'ichi Nomura <j-nomura ce jp nec com>
Cc: Alasdair G Kergon <agk redhat com>
---
 drivers/md/dm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.31-rc/drivers/md/dm.c
===================================================================
--- 2.6.31-rc.orig/drivers/md/dm.c
+++ 2.6.31-rc/drivers/md/dm.c
@@ -845,7 +845,7 @@ static void dm_end_request(struct reques
 			rq->sense_len = clone->sense_len;
 	}
 
-	free_bio_clone(md, clone);
+	BUG_ON(clone->bio);
 	free_rq_tio(md, tio);
 
 	blk_end_request_all(rq, error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]