diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-01-25 10:07:35 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-25 10:07:35 -0700 |
| commit | e26f51f6f68749fb5ee6b3b8f7a5a91bf2633e39 (patch) | |
| tree | b7ab980ef0c1816f0c3fb7daa4d537aca20571db /io_uring | |
| parent | 6e0d71c288fdcf5866f5d0c6cde850a091cc3c55 (diff) | |
io_uring/rsrc: use GFP_KERNEL_ACCOUNT consistently
For potential long term allocations, ensure that we play nicer with
memcg and use the accounting variant of the GFP_KERNEL allocation.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
| -rw-r--r-- | io_uring/memmap.c | 2 | ||||
| -rw-r--r-- | io_uring/rsrc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/memmap.c b/io_uring/memmap.c index 18e574776ef6..81b527dc96f7 100644 --- a/io_uring/memmap.c +++ b/io_uring/memmap.c @@ -56,7 +56,7 @@ struct page **io_pin_pages(unsigned long uaddr, unsigned long len, int *npages) if (WARN_ON_ONCE(nr_pages > INT_MAX)) return ERR_PTR(-EOVERFLOW); - pages = kvmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL); + pages = kvmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL_ACCOUNT); if (!pages) return ERR_PTR(-ENOMEM); diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 41c89f5c616d..73b38888a304 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -1329,7 +1329,7 @@ void io_vec_free(struct iou_vec *iv) int io_vec_realloc(struct iou_vec *iv, unsigned nr_entries) { - gfp_t gfp = GFP_KERNEL | __GFP_NOWARN; + gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_NOWARN; struct iovec *iov; iov = kmalloc_array(nr_entries, sizeof(iov[0]), gfp); |
