diff mbox

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

Message ID 4A3B42FA.1010005@ct.jp.nec.com (mailing list archive)
State Accepted, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

Kiyoshi Ueda June 19, 2009, 7:49 a.m. UTC
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(-)


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

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);