block/io_uring: pass in issue_flags for uring_cmd task_work handling
authorJens Axboe <axboe@kernel.dk>
Tue, 21 Mar 2023 02:01:25 +0000 (20:01 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:51 +0000 (12:10 +0200)
commite5da11825ef7c3f4760b235e04e225e7c8746279
tree797311863e27150c4b18bef5dde34a4b985b96eb
parent4a8f1f5122667b1e54327ddbab7cfd096ac7dc00
block/io_uring: pass in issue_flags for uring_cmd task_work handling

commit 9d2789ac9d60c049d26ef6d3005d9c94c5a559e9 upstream.

io_uring_cmd_done() currently assumes that the uring_lock is held
when invoked, and while it generally is, this is not guaranteed.
Pass in the issue_flags associated with it, so that we have
IO_URING_F_UNLOCKED available to be able to lock the CQ ring
appropriately when completing events.

Cc: stable@vger.kernel.org
Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/ublk_drv.c
drivers/nvme/host/ioctl.c
include/linux/io_uring.h
io_uring/uring_cmd.c