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 '\ --- net/9p/client.c | 8 ++++---- net/9p/trans_fd.c | 4 ++-- net/9p/trans_rdma.c | 2 +- net/9p/trans_usbg.c | 6 +++--- net/9p/trans_virtio.c | 4 ++-- net/9p/trans_xen.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'net/9p') diff --git a/net/9p/client.c b/net/9p/client.c index 3e8de85c7f7f..f0dcf252af7e 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -730,7 +730,7 @@ static struct p9_fid *p9_fid_create(struct p9_client *clnt) struct p9_fid *fid; p9_debug(P9_DEBUG_FID, "clnt %p\n", clnt); - fid = kzalloc_obj(*fid, GFP_KERNEL); + fid = kzalloc_obj(*fid); if (!fid) return NULL; @@ -859,7 +859,7 @@ struct p9_client *p9_client_create(struct fs_context *fc) char *client_id; char *cache_name; - clnt = kmalloc_obj(*clnt, GFP_KERNEL); + clnt = kmalloc_obj(*clnt); if (!clnt) return ERR_PTR(-ENOMEM); @@ -1615,7 +1615,7 @@ struct p9_wstat *p9_client_stat(struct p9_fid *fid) p9_debug(P9_DEBUG_9P, ">>> TSTAT fid %d\n", fid->fid); - ret = kmalloc_obj(*ret, GFP_KERNEL); + ret = kmalloc_obj(*ret); if (!ret) return ERR_PTR(-ENOMEM); @@ -1667,7 +1667,7 @@ struct p9_stat_dotl *p9_client_getattr_dotl(struct p9_fid *fid, p9_debug(P9_DEBUG_9P, ">>> TGETATTR fid %d, request_mask %lld\n", fid->fid, request_mask); - ret = kmalloc_obj(*ret, GFP_KERNEL); + ret = kmalloc_obj(*ret); if (!ret) return ERR_PTR(-ENOMEM); diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 4e0f4a382ac4..dbad3213ba84 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -719,7 +719,7 @@ static int p9_fd_show_options(struct seq_file *m, struct p9_client *clnt) static int p9_fd_open(struct p9_client *client, int rfd, int wfd) { - struct p9_trans_fd *ts = kzalloc_obj(struct p9_trans_fd, GFP_KERNEL); + struct p9_trans_fd *ts = kzalloc_obj(struct p9_trans_fd); if (!ts) return -ENOMEM; @@ -763,7 +763,7 @@ static int p9_socket_open(struct p9_client *client, struct socket *csocket) struct p9_trans_fd *p; struct file *file; - p = kzalloc_obj(struct p9_trans_fd, GFP_KERNEL); + p = kzalloc_obj(struct p9_trans_fd); if (!p) { sock_release(csocket); return -ENOMEM; diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index c8e27c08a3a2..aa5bd74d333f 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -460,7 +460,7 @@ static struct p9_trans_rdma *alloc_rdma(struct p9_rdma_opts *opts) { struct p9_trans_rdma *rdma; - rdma = kzalloc_obj(struct p9_trans_rdma, GFP_KERNEL); + rdma = kzalloc_obj(struct p9_trans_rdma); if (!rdma) return NULL; diff --git a/net/9p/trans_usbg.c b/net/9p/trans_usbg.c index e167f9f23d65..1ce70338999c 100644 --- a/net/9p/trans_usbg.c +++ b/net/9p/trans_usbg.c @@ -757,7 +757,7 @@ static struct usb_function *usb9pfs_alloc(struct usb_function_instance *fi) struct f_usb9pfs_opts *usb9pfs_opts; struct f_usb9pfs *usb9pfs; - usb9pfs = kzalloc_obj(*usb9pfs, GFP_KERNEL); + usb9pfs = kzalloc_obj(*usb9pfs); if (!usb9pfs) return ERR_PTR(-ENOMEM); @@ -910,7 +910,7 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) struct f_usb9pfs_opts *usb9pfs_opts; struct f_usb9pfs_dev *dev; - usb9pfs_opts = kzalloc_obj(*usb9pfs_opts, GFP_KERNEL); + usb9pfs_opts = kzalloc_obj(*usb9pfs_opts); if (!usb9pfs_opts) return ERR_PTR(-ENOMEM); @@ -921,7 +921,7 @@ static struct usb_function_instance *usb9pfs_alloc_instance(void) usb9pfs_opts->buflen = DEFAULT_BUFLEN; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) { kfree(usb9pfs_opts); return ERR_PTR(-ENOMEM); diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0577bdcb67bf..4cdab7094b27 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -601,7 +601,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) return -EINVAL; } - chan = kmalloc_obj(struct virtio_chan, GFP_KERNEL); + chan = kmalloc_obj(struct virtio_chan); if (!chan) { pr_err("Failed to allocate virtio 9P channel\n"); err = -ENOMEM; @@ -641,7 +641,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) if (err) { goto out_free_tag; } - chan->vc_wq = kmalloc_obj(wait_queue_head_t, GFP_KERNEL); + chan->vc_wq = kmalloc_obj(wait_queue_head_t); if (!chan->vc_wq) { err = -ENOMEM; goto out_remove_file; diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c index fd6ac8658549..47af5a10e921 100644 --- a/net/9p/trans_xen.c +++ b/net/9p/trans_xen.c @@ -417,11 +417,11 @@ static int xen_9pfs_front_init(struct xenbus_device *dev) if (p9_xen_trans.maxsize > XEN_FLEX_RING_SIZE(max_ring_order)) p9_xen_trans.maxsize = XEN_FLEX_RING_SIZE(max_ring_order) / 2; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; priv->dev = dev; - priv->rings = kzalloc_objs(*priv->rings, XEN_9PFS_NUM_RINGS, GFP_KERNEL); + priv->rings = kzalloc_objs(*priv->rings, XEN_9PFS_NUM_RINGS); if (!priv->rings) { kfree(priv); return -ENOMEM; -- cgit v1.2.3