Re: [PATCH 3/5] block: don't allow multiple bio_iov_iter_get_pages calls per bio

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

 



On Mon, Apr 08, 2019 at 03:17:35PM -0700, Bart Van Assche wrote:
> On Mon, 2019-04-08 at 12:46 +0200, Christoph Hellwig wrote:
> > No caller uses bio_iov_iter_get_pages multiple times on a given bio,
> > and that funtionality isn't all that useful.  Removing it will make
> > some future changes a little easier and also simplifies the function
> > a bit.
> > 
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > ---
> >  block/bio.c | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> > 
> > diff --git a/block/bio.c b/block/bio.c
> > index ad346082a971..2fa624db21c7 100644
> > --- a/block/bio.c
> > +++ b/block/bio.c
> > @@ -958,7 +958,10 @@ static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
> >  int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
> >  {
> >         const bool is_bvec = iov_iter_is_bvec(iter);
> > -       unsigned short orig_vcnt = bio->bi_vcnt;
> > +       int ret = -EFAULT;
> 
> Is the value -EFAULT used anywhere? In other words, can " = -EFAULT" be left
> out? Otherwise this patch looks good to me.

True, it could be dropped.  The assignment is a leftover from an earlier
version of the patch.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux