From: Minfei Huang <mnfhuang@gmail.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
mhuang@redhat.com
Subject: Re: [PATCH] bio: Make the test correct for idx in __bio_clone_fast
Date: Mon, 18 Jan 2016 21:00:15 +0800 [thread overview]
Message-ID: <20160118130015.GA4069@dhcp-129-109.nay.redhat.com> (raw)
In-Reply-To: <1450458597-20188-1-git-send-email-mnfhuang@gmail.com>
Ping.
Any comment is appreciate.
Thanks
Minfei
On 12/19/15 at 01:09P, Minfei Huang wrote:
> It is more lucky that kernel crash does not happen, since we test the
> bi_pool in function __bio_clone_fast.
>
> The idx will be still equal to BIO_POOL_NONE, if there is no bvec to be
> allocated.
>
> Fix the bug_on condition to make the test correct.
>
> Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
> ---
> block/bio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index 4f184d9..041ece0 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -573,8 +573,7 @@ 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);
> -
> + BUG_ON(BIO_POOL_IDX(bio) != BIO_POOL_NONE);
> /*
> * 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
>
prev parent reply other threads:[~2016-01-18 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 17:09 Minfei Huang
2016-01-18 13:00 ` Minfei Huang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160118130015.GA4069@dhcp-129-109.nay.redhat.com \
--to=mnfhuang@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhuang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®