Re: [PATCH 1/2] block: handle bio_split_to_limits() NULL return

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

 



Per the question in the other thread: these are my comments to it.

On Tue, Jan 10, 2023 at 01:20:26AM -0800, Christoph Hellwig wrote:
> >  		split = bio_split_rw(bio, lim, nr_segs, bs,
> >  				get_max_io_size(bio, lim) << SECTOR_SHIFT);
> > +		if (IS_ERR(split))
> > +			return NULL;
> 
> Can we decide on either passing an ERR_PTR or NULL and do it through
> the whole stack? 
> 
> > diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
> > index eb14ec8ec04c..e36216d50753 100644
> > --- a/drivers/block/drbd/drbd_req.c
> > +++ b/drivers/block/drbd/drbd_req.c
> > @@ -1607,6 +1607,8 @@ void drbd_submit_bio(struct bio *bio)
> >  	struct drbd_device *device = bio->bi_bdev->bd_disk->private_data;
> >  
> >  	bio = bio_split_to_limits(bio);
> > +	if (!bio)
> > +		return;
> 
> So for the callers in drivers, do we need thee checks for drivers
> that don't even support REQ_NOWAIT? 
---end quoted text---



[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