summaryrefslogtreecommitdiff
path: root/fs/overlayfs
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 /fs/overlayfs
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 'fs/overlayfs')
-rw-r--r--fs/overlayfs/file.c2
-rw-r--r--fs/overlayfs/namei.c2
-rw-r--r--fs/overlayfs/params.c2
-rw-r--r--fs/overlayfs/readdir.c4
-rw-r--r--fs/overlayfs/super.c4
-rw-r--r--fs/overlayfs/util.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 7f7a2c2a7937..97bed2286030 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -96,7 +96,7 @@ struct ovl_file {
struct ovl_file *ovl_file_alloc(struct file *realfile)
{
- struct ovl_file *of = kzalloc_obj(struct ovl_file, GFP_KERNEL);
+ struct ovl_file *of = kzalloc_obj(struct ovl_file);
if (unlikely(!of))
return NULL;
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index f30b81ee0d9b..d8dd4b052984 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -481,7 +481,7 @@ int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
goto invalid;
if (!*stackp)
- *stackp = kmalloc_obj(struct ovl_path, GFP_KERNEL);
+ *stackp = kmalloc_obj(struct ovl_path);
if (!*stackp) {
dput(origin);
return -ENOMEM;
diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c
index af735a0c310a..8111b437ae5d 100644
--- a/fs/overlayfs/params.c
+++ b/fs/overlayfs/params.c
@@ -790,7 +790,7 @@ int ovl_init_fs_context(struct fs_context *fc)
goto out_err;
ctx->capacity = 3;
- ofs = kzalloc_obj(struct ovl_fs, GFP_KERNEL);
+ ofs = kzalloc_obj(struct ovl_fs);
if (!ofs)
goto out_err;
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 953c2cdca1b4..a4271e5fb8e6 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -493,7 +493,7 @@ static struct ovl_dir_cache *ovl_cache_get(struct dentry *dentry)
}
ovl_set_dir_cache(d_inode(dentry), NULL);
- cache = kzalloc_obj(struct ovl_dir_cache, GFP_KERNEL);
+ cache = kzalloc_obj(struct ovl_dir_cache);
if (!cache)
return ERR_PTR(-ENOMEM);
@@ -706,7 +706,7 @@ static struct ovl_dir_cache *ovl_cache_get_impure(const struct path *path)
ovl_dir_cache_free(inode);
ovl_set_dir_cache(inode, NULL);
- cache = kzalloc_obj(struct ovl_dir_cache, GFP_KERNEL);
+ cache = kzalloc_obj(struct ovl_dir_cache);
if (!cache)
return ERR_PTR(-ENOMEM);
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index f3a39b7703f5..d4c12feec039 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1031,7 +1031,7 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs,
unsigned int i;
size_t nr_merged_lower;
- ofs->fs = kzalloc_objs(struct ovl_sb, ctx->nr + 2, GFP_KERNEL);
+ ofs->fs = kzalloc_objs(struct ovl_sb, ctx->nr + 2);
if (ofs->fs == NULL)
return -ENOMEM;
@@ -1393,7 +1393,7 @@ static int ovl_fill_super_creds(struct fs_context *fc, struct super_block *sb)
}
err = -ENOMEM;
- layers = kzalloc_objs(struct ovl_layer, ctx->nr + 1, GFP_KERNEL);
+ layers = kzalloc_objs(struct ovl_layer, ctx->nr + 1);
if (!layers)
return err;
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index a28524e83662..4eeafd943fb9 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -113,7 +113,7 @@ bool ovl_verify_lower(struct super_block *sb)
struct ovl_path *ovl_stack_alloc(unsigned int n)
{
- return kzalloc_objs(struct ovl_path, n, GFP_KERNEL);
+ return kzalloc_objs(struct ovl_path, n);
}
void ovl_stack_cpy(struct ovl_path *dst, struct ovl_path *src, unsigned int n)