[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120927044137.GC29160@moria.home.lan>
Date: Wed, 26 Sep 2012 21:41:37 -0700
From: Kent Overstreet <koverstreet@...gle.com>
To: NeilBrown <neilb@...e.de>
Cc: linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org,
dm-devel@...hat.com, tj@...nel.org, axboe@...nel.dk,
vgoyal@...hat.com
Subject: Re: [PATCH v3 05/26] md: Convert md_trim_bio() to use bio_advance()
On Wed, Sep 26, 2012 at 10:38:27AM +1000, NeilBrown wrote:
> On Mon, 24 Sep 2012 15:34:45 -0700 Kent Overstreet <koverstreet@...gle.com>
> wrote:
>
> > Signed-off-by: Kent Overstreet <koverstreet@...gle.com>
> > CC: Jens Axboe <axboe@...nel.dk>
> > CC: NeilBrown <neilb@...e.de>
> > ---
> > drivers/md/md.c | 19 +++++--------------
> > 1 file changed, 5 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/md/md.c b/drivers/md/md.c
> > index 7a2b079..51ce48c 100644
> > --- a/drivers/md/md.c
> > +++ b/drivers/md/md.c
> > @@ -190,25 +190,16 @@ void md_trim_bio(struct bio *bio, int offset, int size)
> > struct bio_vec *bvec;
> > int sofar = 0;
> >
> > - size <<= 9;
> > if (offset == 0 && size == bio->bi_size)
> > return;
>
> Safer to leave the "size <<= 9" where it is, otherwise that condition will
> always fail.
Whoops, moving that certainly didn't make sense. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists