Re: [PATCH v3 05/26] md: Convert md_trim_bio() to use bio_advance()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 26, 2012 at 10:38:27AM +1000, NeilBrown wrote:
> On Mon, 24 Sep 2012 15:34:45 -0700 Kent Overstreet <koverstreet@xxxxxxxxxx>
> wrote:
> 
> > Signed-off-by: Kent Overstreet <koverstreet@xxxxxxxxxx>
> > CC: Jens Axboe <axboe@xxxxxxxxx>
> > CC: NeilBrown <neilb@xxxxxxx>
> > ---
> >  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!

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux