Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311529 > unrolled thread
| Started by | Minfei Huang <mnfhuang@gmail.com> |
|---|---|
| First post | 2016-01-18 14:10 +0100 |
| Last post | 2016-01-18 14:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] bio: Make the test correct for idx in __bio_clone_fast Minfei Huang <mnfhuang@gmail.com> - 2016-01-18 14:10 +0100
| From | Minfei Huang <mnfhuang@gmail.com> |
|---|---|
| Date | 2016-01-18 14:10 +0100 |
| Subject | Re: [PATCH] bio: Make the test correct for idx in __bio_clone_fast |
| Message-ID | <qShJg-13I-17@gated-at.bofh.it> |
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
>
Back to top | Article view | linux.kernel
csiph-web