]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: return locked and pinned page accounting
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 18 Jul 2020 08:31:21 +0000 (11:31 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 19:00:45 +0000 (13:00 -0600)
commit6f1705b0fd6cb086bf2bd6bf6ed47a71d7375c20
tree2acbc156101cc44369b36d1c58d2d6c82c0fb041
parent4fa558a7c26b13894e496af4cfb7cee7b05844ae
io_uring: return locked and pinned page accounting

Locked and pinned memory accounting in io_{,un}account_mem() depends on
having ->sqo_mm, which is NULL after a recent change for non SQPOLL'ed
io_ring. That disables the accounting.

Return ->sqo_mm initialisation back, and do __io_sq_thread_acquire_mm()
based on IORING_SETUP_SQPOLL flag.

Fixes: ca9038269c16c ("io_uring: fix missing ->mm on exit")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c