From patchwork Fri Jun 19 07:49:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiyoshi Ueda X-Patchwork-Id: 31310 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5J7p6dg001068 for ; Fri, 19 Jun 2009 07:51:07 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id B31008E017B; Fri, 19 Jun 2009 03:51:05 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n5J7p1ie021703 for ; Fri, 19 Jun 2009 03:51:02 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with SMTP id n5J7p1IL004371; Fri, 19 Jun 2009 03:51:01 -0400 Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.193]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id n5J7nGjg015203; Fri, 19 Jun 2009 03:49:17 -0400 Received: from mailgate3.nec.co.jp ([10.7.69.192]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n5J7nGjS003194; Fri, 19 Jun 2009 16:49:16 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id n5J7nEg08870; Fri, 19 Jun 2009 16:49:15 +0900 (JST) Received: from mailsv.linux.bs1.fc.nec.co.jp (mailsv.linux.bs1.fc.nec.co.jp [10.34.125.2]) by mailsv3.nec.co.jp (8.13.8/8.13.4) with ESMTP id n5J7nEZx016767; Fri, 19 Jun 2009 16:49:14 +0900 (JST) Received: from elcondor.linux.bs1.fc.nec.co.jp (elcondor.linux.bs1.fc.nec.co.jp [10.34.125.195]) by mailsv.linux.bs1.fc.nec.co.jp (Postfix) with ESMTP id 792DFE482EB; Fri, 19 Jun 2009 16:49:14 +0900 (JST) Message-ID: <4A3B42FA.1010005@ct.jp.nec.com> Date: Fri, 19 Jun 2009 16:49:14 +0900 From: Kiyoshi Ueda User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Alasdair Kergon References: <4A3B40D4.1040905@ct.jp.nec.com> In-Reply-To: <4A3B40D4.1040905@ct.jp.nec.com> X-RedHat-Spam-Score: -0.75 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 X-loop: dm-devel@redhat.com Cc: device-mapper development Subject: [dm-devel] [PATCH 1/4] dm core: use BUG_ON in dm_end_request() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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 Signed-off-by: Jun'ichi Nomura Cc: Alasdair G Kergon --- 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 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);