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, 24 Apr 2022 23:34:19 +0000 (17:34 -0600)
commita03a2a209e826f646dff49202b8b1eb8427c2d08
tree3354612d6114e209c5da6e3341189899481e6873
parent1f59bc0f18cf46abe27ea18cfa4cb7f1b4166896
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