diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 03:37:42 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 04:09:51 +0300 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /fs/cachefiles | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.xz | |
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/cachefiles')
| -rw-r--r-- | fs/cachefiles/daemon.c | 2 | ||||
| -rw-r--r-- | fs/cachefiles/io.c | 4 | ||||
| -rw-r--r-- | fs/cachefiles/volume.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 99795864bcb3..4117b145ac94 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c @@ -102,7 +102,7 @@ static int cachefiles_daemon_open(struct inode *inode, struct file *file) return -EBUSY; /* allocate a cache record */ - cache = kzalloc_obj(struct cachefiles_cache, GFP_KERNEL); + cache = kzalloc_obj(struct cachefiles_cache); if (!cache) { cachefiles_open = 0; return -ENOMEM; diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c index 7b9d547ecee6..eaf47851c65f 100644 --- a/fs/cachefiles/io.c +++ b/fs/cachefiles/io.c @@ -132,7 +132,7 @@ static int cachefiles_read(struct netfs_cache_resources *cres, } ret = -ENOMEM; - ki = kzalloc_obj(struct cachefiles_kiocb, GFP_KERNEL); + ki = kzalloc_obj(struct cachefiles_kiocb); if (!ki) goto presubmission_error; @@ -298,7 +298,7 @@ int __cachefiles_write(struct cachefiles_object *object, file, file_inode(file)->i_ino, start_pos, len, i_size_read(file_inode(file))); - ki = kzalloc_obj(struct cachefiles_kiocb, GFP_KERNEL); + ki = kzalloc_obj(struct cachefiles_kiocb); if (!ki) { if (term_func) term_func(term_func_priv, -ENOMEM); diff --git a/fs/cachefiles/volume.c b/fs/cachefiles/volume.c index 655de0cef530..6c0da61362ee 100644 --- a/fs/cachefiles/volume.c +++ b/fs/cachefiles/volume.c @@ -28,7 +28,7 @@ void cachefiles_acquire_volume(struct fscache_volume *vcookie) _enter(""); - volume = kzalloc_obj(struct cachefiles_volume, GFP_KERNEL); + volume = kzalloc_obj(struct cachefiles_volume); if (!volume) return; volume->vcookie = vcookie; |
