diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /net/ceph | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/ceph')
| -rw-r--r-- | net/ceph/ceph_common.c | 10 | ||||
| -rw-r--r-- | net/ceph/crypto.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index 455787422784..952121849180 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c @@ -309,12 +309,12 @@ struct ceph_options *ceph_alloc_options(void) { struct ceph_options *opt; - opt = kzalloc_obj(*opt, GFP_KERNEL); + opt = kzalloc_obj(*opt); if (!opt) return NULL; opt->crush_locs = RB_ROOT; - opt->mon_addr = kzalloc_objs(*opt->mon_addr, CEPH_MAX_MON, GFP_KERNEL); + opt->mon_addr = kzalloc_objs(*opt->mon_addr, CEPH_MAX_MON); if (!opt->mon_addr) { kfree(opt); return NULL; @@ -455,7 +455,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, ceph_crypto_key_destroy(opt->key); kfree(opt->key); - opt->key = kzalloc_obj(*opt->key, GFP_KERNEL); + opt->key = kzalloc_obj(*opt->key); if (!opt->key) return -ENOMEM; err = ceph_crypto_key_unarmor(opt->key, param->string); @@ -468,7 +468,7 @@ int ceph_parse_param(struct fs_parameter *param, struct ceph_options *opt, ceph_crypto_key_destroy(opt->key); kfree(opt->key); - opt->key = kzalloc_obj(*opt->key, GFP_KERNEL); + opt->key = kzalloc_obj(*opt->key); if (!opt->key) return -ENOMEM; return get_secret(opt->key, param->string, &log); @@ -713,7 +713,7 @@ struct ceph_client *ceph_create_client(struct ceph_options *opt, void *private) if (err < 0) return ERR_PTR(err); - client = kzalloc_obj(*client, GFP_KERNEL); + client = kzalloc_obj(*client); if (client == NULL) return ERR_PTR(-ENOMEM); diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index ef8a98c1174f..de7496791c91 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c @@ -466,7 +466,7 @@ static int ceph_key_preparse(struct key_preparsed_payload *prep) goto err; ret = -ENOMEM; - ckey = kzalloc_obj(*ckey, GFP_KERNEL); + ckey = kzalloc_obj(*ckey); if (!ckey) goto err; |
