[dm-devel] [PATCH v14 03/11] block: add copy offload support

Bart Van Assche bvanassche at acm.org
Fri Aug 11 15:06:08 PDT 2023


On 8/11/23 03:52, Nitesh Shetty wrote:
> +		if (rem != chunk)
> +			atomic_inc(&cio->refcount);

This code will be easier to read if the above if-test is left out
and if the following code is added below the for-loop:

	if (atomic_dec_and_test(&cio->refcount))
		blkdev_copy_endio(cio);

Thanks,

Bart.



More information about the Linux-nvme mailing list