summaryrefslogtreecommitdiff
path: root/fs/squashfs
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/squashfs
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
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/squashfs')
-rw-r--r--fs/squashfs/cache.c4
-rw-r--r--fs/squashfs/decompressor_multi.c6
-rw-r--r--fs/squashfs/decompressor_single.c2
-rw-r--r--fs/squashfs/lz4_wrapper.c2
-rw-r--r--fs/squashfs/lzo_wrapper.c2
-rw-r--r--fs/squashfs/page_actor.c4
-rw-r--r--fs/squashfs/super.c4
-rw-r--r--fs/squashfs/xz_wrapper.c4
-rw-r--r--fs/squashfs/zlib_wrapper.c2
-rw-r--r--fs/squashfs/zstd_wrapper.c2
10 files changed, 16 insertions, 16 deletions
diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c
index 5d97b22ce297..8e958db5f786 100644
--- a/fs/squashfs/cache.c
+++ b/fs/squashfs/cache.c
@@ -229,13 +229,13 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries,
if (entries == 0)
return NULL;
- cache = kzalloc_obj(*cache, GFP_KERNEL);
+ cache = kzalloc_obj(*cache);
if (cache == NULL) {
ERROR("Failed to allocate %s cache\n", name);
return ERR_PTR(-ENOMEM);
}
- cache->entry = kzalloc_objs(*(cache->entry), entries, GFP_KERNEL);
+ cache->entry = kzalloc_objs(*(cache->entry), entries);
if (cache->entry == NULL) {
ERROR("Failed to allocate %s cache\n", name);
goto cleanup;
diff --git a/fs/squashfs/decompressor_multi.c b/fs/squashfs/decompressor_multi.c
index 4d7bc620bef5..5c1aede1eddb 100644
--- a/fs/squashfs/decompressor_multi.c
+++ b/fs/squashfs/decompressor_multi.c
@@ -65,7 +65,7 @@ static void *squashfs_decompressor_create(struct squashfs_sb_info *msblk,
struct decomp_stream *decomp_strm = NULL;
int err = -ENOMEM;
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (!stream)
goto out;
@@ -80,7 +80,7 @@ static void *squashfs_decompressor_create(struct squashfs_sb_info *msblk,
* we could always fall back to default decompressor and
* file system works.
*/
- decomp_strm = kmalloc_obj(*decomp_strm, GFP_KERNEL);
+ decomp_strm = kmalloc_obj(*decomp_strm);
if (!decomp_strm)
goto out;
@@ -148,7 +148,7 @@ static struct decomp_stream *get_decomp_stream(struct squashfs_sb_info *msblk,
goto wait;
/* Let's allocate new decomp */
- decomp_strm = kmalloc_obj(*decomp_strm, GFP_KERNEL);
+ decomp_strm = kmalloc_obj(*decomp_strm);
if (!decomp_strm)
goto wait;
diff --git a/fs/squashfs/decompressor_single.c b/fs/squashfs/decompressor_single.c
index 1f1597104ca8..48501ba55fce 100644
--- a/fs/squashfs/decompressor_single.c
+++ b/fs/squashfs/decompressor_single.c
@@ -30,7 +30,7 @@ static void *squashfs_decompressor_create(struct squashfs_sb_info *msblk,
struct squashfs_stream *stream;
int err = -ENOMEM;
- stream = kmalloc_obj(*stream, GFP_KERNEL);
+ stream = kmalloc_obj(*stream);
if (stream == NULL)
goto out;
diff --git a/fs/squashfs/lz4_wrapper.c b/fs/squashfs/lz4_wrapper.c
index e482757d8f2c..1646bbee290e 100644
--- a/fs/squashfs/lz4_wrapper.c
+++ b/fs/squashfs/lz4_wrapper.c
@@ -54,7 +54,7 @@ static void *lz4_init(struct squashfs_sb_info *msblk, void *buff)
int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE);
struct squashfs_lz4 *stream;
- stream = kzalloc_obj(*stream, GFP_KERNEL);
+ stream = kzalloc_obj(*stream);
if (stream == NULL)
goto failed;
stream->input = vmalloc(block_size);
diff --git a/fs/squashfs/lzo_wrapper.c b/fs/squashfs/lzo_wrapper.c
index 961fda720c14..be1df7a25046 100644
--- a/fs/squashfs/lzo_wrapper.c
+++ b/fs/squashfs/lzo_wrapper.c
@@ -29,7 +29,7 @@ static void *lzo_init(struct squashfs_sb_info *msblk, void *buff)
{
int block_size = max_t(int, msblk->block_size, SQUASHFS_METADATA_SIZE);
- struct squashfs_lzo *stream = kzalloc_obj(*stream, GFP_KERNEL);
+ struct squashfs_lzo *stream = kzalloc_obj(*stream);
if (stream == NULL)
goto failed;
stream->input = vmalloc(block_size);
diff --git a/fs/squashfs/page_actor.c b/fs/squashfs/page_actor.c
index 3d8f0225e240..79b73e98abab 100644
--- a/fs/squashfs/page_actor.c
+++ b/fs/squashfs/page_actor.c
@@ -43,7 +43,7 @@ static void cache_finish_page(struct squashfs_page_actor *actor)
struct squashfs_page_actor *squashfs_page_actor_init(void **buffer,
int pages, int length)
{
- struct squashfs_page_actor *actor = kmalloc_obj(*actor, GFP_KERNEL);
+ struct squashfs_page_actor *actor = kmalloc_obj(*actor);
if (actor == NULL)
return NULL;
@@ -110,7 +110,7 @@ static void direct_finish_page(struct squashfs_page_actor *actor)
struct squashfs_page_actor *squashfs_page_actor_init_special(struct squashfs_sb_info *msblk,
struct page **page, int pages, int length, loff_t start_index)
{
- struct squashfs_page_actor *actor = kmalloc_obj(*actor, GFP_KERNEL);
+ struct squashfs_page_actor *actor = kmalloc_obj(*actor);
if (actor == NULL)
return NULL;
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 69217e752bc5..5dabc5770f1b 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -196,7 +196,7 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc)
return -EINVAL;
}
- sb->s_fs_info = kzalloc_obj(*msblk, GFP_KERNEL);
+ sb->s_fs_info = kzalloc_obj(*msblk);
if (sb->s_fs_info == NULL) {
ERROR("Failed to allocate squashfs_sb_info\n");
return -ENOMEM;
@@ -549,7 +549,7 @@ static int squashfs_init_fs_context(struct fs_context *fc)
{
struct squashfs_mount_opts *opts;
- opts = kzalloc_obj(*opts, GFP_KERNEL);
+ opts = kzalloc_obj(*opts);
if (!opts)
return -ENOMEM;
diff --git a/fs/squashfs/xz_wrapper.c b/fs/squashfs/xz_wrapper.c
index d258f4726d2e..0a4ff3ec9c8c 100644
--- a/fs/squashfs/xz_wrapper.c
+++ b/fs/squashfs/xz_wrapper.c
@@ -42,7 +42,7 @@ static void *squashfs_xz_comp_opts(struct squashfs_sb_info *msblk,
struct comp_opts *opts;
int err = 0, n;
- opts = kmalloc_obj(*opts, GFP_KERNEL);
+ opts = kmalloc_obj(*opts);
if (opts == NULL) {
err = -ENOMEM;
goto out2;
@@ -84,7 +84,7 @@ static void *squashfs_xz_init(struct squashfs_sb_info *msblk, void *buff)
struct squashfs_xz *stream;
int err;
- stream = kmalloc_obj(*stream, GFP_KERNEL);
+ stream = kmalloc_obj(*stream);
if (stream == NULL) {
err = -ENOMEM;
goto failed;
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c
index 899629c54d97..a29001311939 100644
--- a/fs/squashfs/zlib_wrapper.c
+++ b/fs/squashfs/zlib_wrapper.c
@@ -23,7 +23,7 @@
static void *zlib_init(struct squashfs_sb_info *dummy, void *buff)
{
- z_stream *stream = kmalloc_obj(z_stream, GFP_KERNEL);
+ z_stream *stream = kmalloc_obj(z_stream);
if (stream == NULL)
goto failed;
stream->workspace = vmalloc(zlib_inflate_workspacesize());
diff --git a/fs/squashfs/zstd_wrapper.c b/fs/squashfs/zstd_wrapper.c
index 632560e4d6b0..487fbc51d264 100644
--- a/fs/squashfs/zstd_wrapper.c
+++ b/fs/squashfs/zstd_wrapper.c
@@ -28,7 +28,7 @@ struct workspace {
static void *zstd_init(struct squashfs_sb_info *msblk, void *buff)
{
- struct workspace *wksp = kmalloc_obj(*wksp, GFP_KERNEL);
+ struct workspace *wksp = kmalloc_obj(*wksp);
if (wksp == NULL)
goto failed;