Re: [PATCH for-next v8 5/5] nvme: wire up fixed buffer support for nvme passthrough

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

 



On Fri, Sep 23, 2022 at 02:58:54PM +0530, Kanchan Joshi wrote:
>  	if (!vec)
> +		if (!fixedbufs)
> +			ret = blk_rq_map_user(q, req, NULL,
> +					nvme_to_user_ptr(ubuffer), bufflen,
> +					GFP_KERNEL);
> +		else {
> +			struct iov_iter iter;
> +
> +			ret = io_uring_cmd_import_fixed(ubuffer, bufflen,
> +					rq_data_dir(req), &iter, ioucmd);
> +			if (ret < 0)
> +				goto out;
> +			ret = blk_rq_map_user_bvec(req, &iter);
> +		}

Given that the fixedufs case doesn't handle the vec case we can
do with some untangling and a single level of indentation here.

Even with that a WARN_ON_ONCE() for that impossible case would be good
to have, though.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux