From bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 21 Feb 2026 16:37:42 -0800 Subject: Convert 'alloc_obj' family to use the new default GFP_KERNEL argument This was done entirely with mindless brute force, using git grep -l '\ --- io_uring/eventfd.c | 2 +- io_uring/io-wq.c | 4 ++-- io_uring/io_uring.c | 2 +- io_uring/kbuf.c | 2 +- io_uring/mock_file.c | 2 +- io_uring/rsrc.c | 2 +- io_uring/sqpoll.c | 2 +- io_uring/tctx.c | 6 +++--- io_uring/xattr.c | 4 ++-- io_uring/zcrx.c | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) (limited to 'io_uring') diff --git a/io_uring/eventfd.c b/io_uring/eventfd.c index 0120ecd97321..cbea1c289485 100644 --- a/io_uring/eventfd.c +++ b/io_uring/eventfd.c @@ -127,7 +127,7 @@ int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg, if (copy_from_user(&fd, fds, sizeof(*fds))) return -EFAULT; - ev_fd = kmalloc_obj(*ev_fd, GFP_KERNEL); + ev_fd = kmalloc_obj(*ev_fd); if (!ev_fd) return -ENOMEM; diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 2d04ff565920..7a9f94a0ce6f 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -897,7 +897,7 @@ static bool create_io_worker(struct io_wq *wq, struct io_wq_acct *acct) __set_current_state(TASK_RUNNING); - worker = kzalloc_obj(*worker, GFP_KERNEL); + worker = kzalloc_obj(*worker); if (!worker) { fail: atomic_dec(&acct->nr_running); @@ -1255,7 +1255,7 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data) if (WARN_ON_ONCE(!bounded)) return ERR_PTR(-EINVAL); - wq = kzalloc_obj(struct io_wq, GFP_KERNEL); + wq = kzalloc_obj(struct io_wq); if (!wq) return ERR_PTR(-ENOMEM); diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 3c64c458a281..aa95703165f1 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -226,7 +226,7 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) int hash_bits; bool ret; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return NULL; diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index aea1794dc5f6..2ffa95b1c601 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -265,7 +265,7 @@ static int io_ring_buffers_peek(struct io_kiocb *req, struct buf_sel_arg *arg, * a speculative peek operation. */ if (arg->mode & KBUF_MODE_EXPAND && nr_avail > nr_iovs && arg->max_len) { - iov = kmalloc_objs(struct iovec, nr_avail, GFP_KERNEL); + iov = kmalloc_objs(struct iovec, nr_avail); if (unlikely(!iov)) return -ENOMEM; if (arg->mode & KBUF_MODE_FREE) diff --git a/io_uring/mock_file.c b/io_uring/mock_file.c index 221b60ad0723..b318ed697998 100644 --- a/io_uring/mock_file.c +++ b/io_uring/mock_file.c @@ -115,7 +115,7 @@ static ssize_t io_mock_delay_rw(struct kiocb *iocb, size_t len) struct io_mock_file *mf = iocb->ki_filp->private_data; struct io_mock_iocb *mio; - mio = kzalloc_obj(*mio, GFP_KERNEL); + mio = kzalloc_obj(*mio); if (!mio) return -ENOMEM; diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 9b799e7ba889..d84f48d90d40 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -683,7 +683,7 @@ static bool io_coalesce_buffer(struct page ***pages, int *nr_pages, unsigned i, j; /* Store head pages only*/ - new_array = kvmalloc_objs(struct page *, nr_folios, GFP_KERNEL); + new_array = kvmalloc_objs(struct page *, nr_folios); if (!new_array) return false; diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index 97e64d7d029f..c6bb938ec5ea 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -153,7 +153,7 @@ static struct io_sq_data *io_get_sq_data(struct io_uring_params *p, return sqd; } - sqd = kzalloc_obj(*sqd, GFP_KERNEL); + sqd = kzalloc_obj(*sqd); if (!sqd) return ERR_PTR(-ENOMEM); diff --git a/io_uring/tctx.c b/io_uring/tctx.c index fa97bc7db6a3..7cbcb82aedfb 100644 --- a/io_uring/tctx.c +++ b/io_uring/tctx.c @@ -23,7 +23,7 @@ static struct io_wq *io_init_wq_offload(struct io_ring_ctx *ctx, mutex_lock(&ctx->uring_lock); hash = ctx->hash_map; if (!hash) { - hash = kzalloc_obj(*hash, GFP_KERNEL); + hash = kzalloc_obj(*hash); if (!hash) { mutex_unlock(&ctx->uring_lock); return ERR_PTR(-ENOMEM); @@ -80,7 +80,7 @@ __cold int io_uring_alloc_task_context(struct task_struct *task, struct io_uring_task *tctx; int ret; - tctx = kzalloc_obj(*tctx, GFP_KERNEL); + tctx = kzalloc_obj(*tctx); if (unlikely(!tctx)) return -ENOMEM; @@ -139,7 +139,7 @@ int __io_uring_add_tctx_node(struct io_ring_ctx *ctx) if (tctx->io_wq) io_wq_set_exit_on_idle(tctx->io_wq, false); if (!xa_load(&tctx->xa, (unsigned long)ctx)) { - node = kmalloc_obj(*node, GFP_KERNEL); + node = kmalloc_obj(*node); if (!node) return -ENOMEM; node->ctx = ctx; diff --git a/io_uring/xattr.c b/io_uring/xattr.c index 28475bf8ed47..5303df3f247f 100644 --- a/io_uring/xattr.c +++ b/io_uring/xattr.c @@ -56,7 +56,7 @@ static int __io_getxattr_prep(struct io_kiocb *req, if (ix->ctx.flags) return -EINVAL; - ix->ctx.kname = kmalloc_obj(*ix->ctx.kname, GFP_KERNEL); + ix->ctx.kname = kmalloc_obj(*ix->ctx.kname); if (!ix->ctx.kname) return -ENOMEM; @@ -133,7 +133,7 @@ static int __io_setxattr_prep(struct io_kiocb *req, ix->ctx.size = READ_ONCE(sqe->len); ix->ctx.flags = READ_ONCE(sqe->xattr_flags); - ix->ctx.kname = kmalloc_obj(*ix->ctx.kname, GFP_KERNEL); + ix->ctx.kname = kmalloc_obj(*ix->ctx.kname); if (!ix->ctx.kname) return -ENOMEM; diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index affb802fa2da..cf5bec065aaf 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -452,7 +452,7 @@ static int io_zcrx_create_area(struct io_zcrx_ifq *ifq, } ret = -ENOMEM; - area = kzalloc_obj(*area, GFP_KERNEL); + area = kzalloc_obj(*area); if (!area) goto err; area->ifq = ifq; @@ -514,7 +514,7 @@ static struct io_zcrx_ifq *io_zcrx_ifq_alloc(struct io_ring_ctx *ctx) { struct io_zcrx_ifq *ifq; - ifq = kzalloc_obj(*ifq, GFP_KERNEL); + ifq = kzalloc_obj(*ifq); if (!ifq) return NULL; -- cgit v1.2.3