diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 1efaf29514e8..d569cea12df9 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -162,8 +162,9 @@ static struct io_mapped_ubuf *io_alloc_imu(struct io_ring_ctx *ctx, int nr_bvecs) { if (nr_bvecs <= IO_CACHED_BVECS_SEGS) - return io_cache_alloc(&ctx->imu_cache, GFP_KERNEL); - return kvmalloc_flex(struct io_mapped_ubuf, bvec, nr_bvecs); + return io_cache_alloc(&ctx->imu_cache, GFP_KERNEL_ACCOUNT); + return kvmalloc_flex(struct io_mapped_ubuf, bvec, nr_bvecs, + GFP_KERNEL_ACCOUNT); } static void io_free_imu(struct io_ring_ctx *ctx, struct io_mapped_ubuf *imu) @@ -246,7 +247,7 @@ struct io_rsrc_node *io_rsrc_node_alloc(struct io_ring_ctx *ctx, int type) { struct io_rsrc_node *node; - node = io_cache_alloc(&ctx->node_cache, GFP_KERNEL); + node = io_cache_alloc(&ctx->node_cache, GFP_KERNEL_ACCOUNT); if (node) { node->type = type; node->refs = 1;