summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-09-24 07:39:08 -0600
committerJens Axboe <axboe@kernel.dk>2021-09-24 10:24:34 -0600
commit9990da93d2bf9892c2c14c958bef050d4e461a1a (patch)
treee99b8929c34822f11c50306ec2f271e7fde10418 /fs/io_uring.c
parent8bab4c09f24ec8d4a7a78ab343620f89d3a24804 (diff)
io_uring: put provided buffer meta data under memcg accounting
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>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index ef3c94a55fbd..01e49d01fe74 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4387,7 +4387,7 @@ static int io_add_buffers(struct io_provide_buf *pbuf, struct io_buffer **head)
int i, bid = pbuf->bid;
for (i = 0; i < pbuf->nbufs; i++) {
- buf = kmalloc(sizeof(*buf), GFP_KERNEL);
+ buf = kmalloc(sizeof(*buf), GFP_KERNEL_ACCOUNT);
if (!buf)
break;