io_uring: uniform SCM accounting
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 7 Apr 2022 12:40:01 +0000 (13:40 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 17 Apr 2022 22:52:13 +0000 (16:52 -0600)
commit058bd81d0c5444baa6a52a31540ce46fc40184e9
tree1a5f2f360167007e767fcbfee88384486fada687
parent12beeef15d414db14b9edaacb3710b262b239d9a
io_uring: uniform SCM accounting

Channel all SCM accounting through io_sqe_file_register(), so we do it
uniformely for updates and initial registration and can kill duplicated
code. Registration might be slightly slower in some case, but first we
skip most of SCM accounting now so it's not a problem. Moreover, it's
nicer for an empty set registration as we don't even try to allocate
skb for them anymore.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6c9afbeb22812777d0c43e52353b63db5b87ed1e.1649334991.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c