summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /net/rds
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/cong.c2
-rw-r--r--net/rds/ib_rdma.c6
-rw-r--r--net/rds/info.c2
-rw-r--r--net/rds/message.c2
-rw-r--r--net/rds/rdma.c14
5 files changed, 13 insertions, 13 deletions
diff --git a/net/rds/cong.c b/net/rds/cong.c
index e7f019c3a625..3133b91f9e69 100644
--- a/net/rds/cong.c
+++ b/net/rds/cong.c
@@ -143,7 +143,7 @@ static struct rds_cong_map *rds_cong_from_addr(const struct in6_addr *addr)
unsigned long i;
unsigned long flags;
- map = kzalloc_obj(struct rds_cong_map, GFP_KERNEL);
+ map = kzalloc_obj(struct rds_cong_map);
if (!map)
return NULL;
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index 651f658a6a0a..077f7041df15 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -67,7 +67,7 @@ static int rds_ib_add_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr)
{
struct rds_ib_ipaddr *i_ipaddr;
- i_ipaddr = kmalloc_obj(*i_ipaddr, GFP_KERNEL);
+ i_ipaddr = kmalloc_obj(*i_ipaddr);
if (!i_ipaddr)
return -ENOMEM;
@@ -585,7 +585,7 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents,
if (key_ret)
*key_ret = ib_mr->rkey;
- ibmr = kzalloc_obj(*ibmr, GFP_KERNEL);
+ ibmr = kzalloc_obj(*ibmr);
if (!ibmr) {
ib_dereg_mr(ib_mr);
ret = -ENOMEM;
@@ -641,7 +641,7 @@ struct rds_ib_mr_pool *rds_ib_create_mr_pool(struct rds_ib_device *rds_ibdev,
{
struct rds_ib_mr_pool *pool;
- pool = kzalloc_obj(*pool, GFP_KERNEL);
+ pool = kzalloc_obj(*pool);
if (!pool)
return ERR_PTR(-ENOMEM);
diff --git a/net/rds/info.c b/net/rds/info.c
index 696e957c41a9..f1b29994934a 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -187,7 +187,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
nr_pages = (PAGE_ALIGN(start + len) - (start & PAGE_MASK))
>> PAGE_SHIFT;
- pages = kmalloc_objs(struct page *, nr_pages, GFP_KERNEL);
+ pages = kmalloc_objs(struct page *, nr_pages);
if (!pages) {
ret = -ENOMEM;
goto out;
diff --git a/net/rds/message.c b/net/rds/message.c
index e367ca4f4f31..eaa6f22601a4 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -415,7 +415,7 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *
*/
sg = rm->data.op_sg;
- info = kzalloc_obj(*info, GFP_KERNEL);
+ info = kzalloc_obj(*info);
if (!info)
return -ENOMEM;
INIT_LIST_HEAD(&info->rs_zcookie_next);
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 0015531aff05..0206492014b7 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -228,13 +228,13 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
args->vec.addr, args->vec.bytes, nr_pages);
/* XXX clamp nr_pages to limit the size of this alloc? */
- pages = kzalloc_objs(struct page *, nr_pages, GFP_KERNEL);
+ pages = kzalloc_objs(struct page *, nr_pages);
if (!pages) {
ret = -ENOMEM;
goto out;
}
- mr = kzalloc_obj(struct rds_mr, GFP_KERNEL);
+ mr = kzalloc_obj(struct rds_mr);
if (!mr) {
ret = -ENOMEM;
goto out;
@@ -269,7 +269,7 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
goto out;
} else {
nents = ret;
- sg = kmalloc_objs(*sg, nents, GFP_KERNEL);
+ sg = kmalloc_objs(*sg, nents);
if (!sg) {
ret = -ENOMEM;
goto out;
@@ -571,7 +571,7 @@ int rds_rdma_extra_size(struct rds_rdma_args *args,
if (args->nr_local > UIO_MAXIOV)
return -EMSGSIZE;
- iov->iov = kzalloc_objs(struct rds_iovec, args->nr_local, GFP_KERNEL);
+ iov->iov = kzalloc_objs(struct rds_iovec, args->nr_local);
if (!iov->iov)
return -ENOMEM;
@@ -652,7 +652,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
goto out_ret;
}
- pages = kzalloc_objs(struct page *, nr_pages, GFP_KERNEL);
+ pages = kzalloc_objs(struct page *, nr_pages);
if (!pages) {
ret = -ENOMEM;
goto out_ret;
@@ -679,7 +679,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
* would have to use GFP_ATOMIC there, and don't want to deal
* with failed allocations.
*/
- op->op_notifier = kmalloc_obj(struct rds_notifier, GFP_KERNEL);
+ op->op_notifier = kmalloc_obj(struct rds_notifier);
if (!op->op_notifier) {
ret = -ENOMEM;
goto out_pages;
@@ -728,7 +728,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
ret = -EOPNOTSUPP;
goto out_pages;
}
- local_odp_mr = kzalloc_obj(*local_odp_mr, GFP_KERNEL);
+ local_odp_mr = kzalloc_obj(*local_odp_mr);
if (!local_odp_mr) {
ret = -ENOMEM;
goto out_pages;