[PATCH] nvme: core: don't hold rcu read lock in nvme_ns_chr_uring_cmd_iopoll

Jens Axboe axboe at kernel.dk
Fri Aug 11 07:12:18 PDT 2023


On 8/8/23 8:04 PM, Ming Lei wrote:
> Now nvme_ns_chr_uring_cmd_iopoll() has switched to request based io
> polling, and the associated NS is guaranteed to be live in case of
> io polling, so request is guaranteed to be valid because blk-mq uses
> pre-allocated request pool.
> 
> Remove the rcu read lock in nvme_ns_chr_uring_cmd_iopoll(), which
> isn't needed any more after switching to request based io polling.
> 
> Fix "BUG: sleeping function called from invalid context" because
> set_page_dirty_lock() from blk_rq_unmap_user() may sleep.

Reviewed-by: Jens Axboe <axboe at kernel.dk>

Keith, I'll just apply this directly so it can make this weeks pull
request.

-- 
Jens Axboe




More information about the Linux-nvme mailing list