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---