Re: [PATCH v2 13/21] block, blksnap: functions and structures for performing block I/O operations

From: Christoph Hellwig
Date: Thu Dec 15 2022 - 05:06:32 EST


> + bio = bio_alloc_bioset(diff_region->bdev, nr_iovecs, opf, gfp_mask,
> + &diff_io_bioset);
> + if (unlikely(!bio)) {
> + if (is_nowait)
> + ret = -EAGAIN;
> + else
> + ret = -ENOMEM;
> + goto fail;

bio_alloc_bioset can't fail for the !is_nowait case.