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 /fs/lockd | |
| 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 'fs/lockd')
| -rw-r--r-- | fs/lockd/clntlock.c | 2 | ||||
| -rw-r--r-- | fs/lockd/clntproc.c | 4 | ||||
| -rw-r--r-- | fs/lockd/host.c | 2 | ||||
| -rw-r--r-- | fs/lockd/svclock.c | 4 | ||||
| -rw-r--r-- | fs/lockd/svcsubs.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 372fe0cf830f..85bc0f3e91df 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -233,7 +233,7 @@ reclaimer(void *ptr) u32 nsmstate; struct net *net = host->net; - req = kmalloc_obj(*req, GFP_KERNEL); + req = kmalloc_obj(*req); if (!req) return 0; diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index e189b3ddfedf..fb4d0752c9bb 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -105,7 +105,7 @@ static struct nlm_lockowner *nlmclnt_find_lockowner(struct nlm_host *host, fl_ow res = __nlmclnt_find_lockowner(host, owner); if (res == NULL) { spin_unlock(&host->h_lock); - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); spin_lock(&host->h_lock); res = __nlmclnt_find_lockowner(host, owner); if (res == NULL && new != NULL) { @@ -208,7 +208,7 @@ struct nlm_rqst *nlm_alloc_call(struct nlm_host *host) struct nlm_rqst *call; for(;;) { - call = kzalloc_obj(*call, GFP_KERNEL); + call = kzalloc_obj(*call); if (call != NULL) { refcount_set(&call->a_count, 1); locks_init_lock(&call->a_args.lock.fl); diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 12a745a543e0..1a9582a10a86 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -126,7 +126,7 @@ static struct nlm_host *nlm_alloc_host(struct nlm_lookup_host_info *ni, } } - host = kmalloc_obj(*host, GFP_KERNEL); + host = kmalloc_obj(*host); if (unlikely(host == NULL)) { dprintk("lockd: %s failed; no memory\n", __func__); nsm_release(nsm); diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 1dee1da9ee0f..255a847ca0b6 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -233,7 +233,7 @@ nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host, return NULL; /* Allocate memory for block, and initialize arguments */ - block = kzalloc_obj(*block, GFP_KERNEL); + block = kzalloc_obj(*block); if (block == NULL) goto failed; kref_init(&block->b_count); @@ -380,7 +380,7 @@ static struct nlm_lockowner *nlmsvc_find_lockowner(struct nlm_host *host, pid_t if (res == NULL) { spin_unlock(&host->h_lock); - new = kmalloc_obj(*res, GFP_KERNEL); + new = kmalloc_obj(*res); spin_lock(&host->h_lock); res = __nlmsvc_find_lockowner(host, pid); if (res == NULL && new != NULL) { diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index fcfeaf6d6855..dd0214dcb695 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -128,7 +128,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, nlm_debug_print_fh("creating file for", &lock->fh); nfserr = nlm_lck_denied_nolocks; - file = kzalloc_obj(*file, GFP_KERNEL); + file = kzalloc_obj(*file); if (!file) goto out_free; |
