]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: replace sqd rw_semaphore with mutex
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 14 Mar 2021 20:57:10 +0000 (20:57 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Mar 2021 15:32:40 +0000 (09:32 -0600)
commitbbadfe99e4192261e9d221b0628ce79690142f81
tree050edd8ceb6d2f5ca6d5a24e826bd2063b482d07
parent872d8ab45d548d00f59f7a11c87f0f2a171a0e44
io_uring: replace sqd rw_semaphore with mutex

The only user of read-locking of sqd->rw_lock is sq_thread itself, which
is by definition alone, so we don't really need rw_semaphore, but mutex
will do. Replace it with a mutex, and kill read-to-write upgrading and
extra task_work handling in io_sq_thread().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c