Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753741AbbLRPbE (ORCPT ); Fri, 18 Dec 2015 10:31:04 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36593 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592AbbLRPbB (ORCPT ); Fri, 18 Dec 2015 10:31:01 -0500 Date: Fri, 18 Dec 2015 23:31:03 +0800 From: Minfei Huang To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, mhuang@redhat.com Subject: Re: [PATCH 1/2] bio: Remove the incorrect test for idx in __bio_clone_fast Message-ID: <20151218153103.GB19027@dhcp-129-201.nay.redhat.com> References: <1450450952-18565-1-git-send-email-mnfhuang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450450952-18565-1-git-send-email-mnfhuang@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1396 Lines: 45 On 12/18/15 at 11:02P, Minfei Huang wrote: > It is more lucky that kernel crash does not happen, since we test the > bi_pool in function __bio_clone_fast. Now bi_flags is used to flag the > idx, so it is incorrect to test the bi_pool. > > For now, the bio in function __bio_clone_fast may have its own bvec, if > the caller is bio_clone_fast. > > Removing the test to fix this issue. > > Signed-off-by: Minfei Huang > --- > block/bio.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/block/bio.c b/block/bio.c > index 4f184d9..70d9814 100644 > --- a/block/bio.c > +++ b/block/bio.c > @@ -573,8 +573,6 @@ EXPORT_SYMBOL(bio_phys_segments); > */ > void __bio_clone_fast(struct bio *bio, struct bio *bio_src) > { > - BUG_ON(bio->bi_pool && BIO_POOL_IDX(bio) != BIO_POOL_NONE); > - Sorry to bother you, since I have missed the nr_iovecs in function bio_clone_fast. Will update this patch to make test correct, instead of removing it. Thanks Minfei > /* > * most users will be overriding ->bi_bdev with a new target, > * so we don't set nor calculate new physical/hw segment counts here > -- > 2.6.3 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/