io_uring: put provided buffer meta data under memcg accounting
authorJens Axboe <axboe@kernel.dk>
Fri, 24 Sep 2021 13:39:08 +0000 (07:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Sep 2021 08:11:05 +0000 (10:11 +0200)
commitce092350b452f256bff4b39d74c80c221bf8b0cf
tree574647deea92f3868ea2491a7d3dd12acc3ea1f8
parent7040b37a96302be1df77d1ab62bbb978dfacb0d7
io_uring: put provided buffer meta data under memcg accounting

[ Upstream commit 9990da93d2bf9892c2c14c958bef050d4e461a1a ]

For each provided buffer, we allocate a struct io_buffer to hold the
data associated with it. As a large number of buffers can be provided,
account that data with memcg.

Fixes: ddf0322db79c ("io_uring: add IORING_OP_PROVIDE_BUFFERS")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c