summaryrefslogtreecommitdiff
path: root/fs/erofs
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/erofs
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/erofs')
-rw-r--r--fs/erofs/decompressor_deflate.c2
-rw-r--r--fs/erofs/decompressor_lzma.c2
-rw-r--r--fs/erofs/decompressor_zstd.c2
-rw-r--r--fs/erofs/fscache.c8
-rw-r--r--fs/erofs/super.c8
-rw-r--r--fs/erofs/xattr.c2
-rw-r--r--fs/erofs/zutil.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/fs/erofs/decompressor_deflate.c b/fs/erofs/decompressor_deflate.c
index 787eb8fc6262..6167af1ffeb9 100644
--- a/fs/erofs/decompressor_deflate.c
+++ b/fs/erofs/decompressor_deflate.c
@@ -71,7 +71,7 @@ static int z_erofs_load_deflate_config(struct super_block *sb,
++z_erofs_deflate_avail_strms) {
struct z_erofs_deflate *strm;
- strm = kzalloc_obj(*strm, GFP_KERNEL);
+ strm = kzalloc_obj(*strm);
if (!strm)
goto failed;
/* XXX: in-kernel zlib cannot customize windowbits */
diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c
index c1c908d7b6ef..f6692d0f2f04 100644
--- a/fs/erofs/decompressor_lzma.c
+++ b/fs/erofs/decompressor_lzma.c
@@ -54,7 +54,7 @@ static int __init z_erofs_lzma_init(void)
z_erofs_lzma_nstrms = num_possible_cpus();
for (i = 0; i < z_erofs_lzma_nstrms; ++i) {
- struct z_erofs_lzma *strm = kzalloc_obj(*strm, GFP_KERNEL);
+ struct z_erofs_lzma *strm = kzalloc_obj(*strm);
if (!strm) {
z_erofs_lzma_exit();
diff --git a/fs/erofs/decompressor_zstd.c b/fs/erofs/decompressor_zstd.c
index 6da93f74431b..ab318a2400f9 100644
--- a/fs/erofs/decompressor_zstd.c
+++ b/fs/erofs/decompressor_zstd.c
@@ -59,7 +59,7 @@ static int __init z_erofs_zstd_init(void)
++z_erofs_zstd_avail_strms) {
struct z_erofs_zstd *strm;
- strm = kzalloc_obj(*strm, GFP_KERNEL);
+ strm = kzalloc_obj(*strm);
if (!strm) {
z_erofs_zstd_exit();
return -ENOMEM;
diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c
index 0a231063b341..685c68774379 100644
--- a/fs/erofs/fscache.c
+++ b/fs/erofs/fscache.c
@@ -70,7 +70,7 @@ static void erofs_fscache_req_put(struct erofs_fscache_rq *req)
static struct erofs_fscache_rq *erofs_fscache_req_alloc(struct address_space *mapping,
loff_t start, size_t len)
{
- struct erofs_fscache_rq *req = kzalloc_obj(*req, GFP_KERNEL);
+ struct erofs_fscache_rq *req = kzalloc_obj(*req);
if (!req)
return NULL;
@@ -101,7 +101,7 @@ static void erofs_fscache_req_end_io(void *priv, ssize_t transferred_or_error)
static struct erofs_fscache_io *erofs_fscache_req_io_alloc(struct erofs_fscache_rq *req)
{
- struct erofs_fscache_io *io = kzalloc_obj(*io, GFP_KERNEL);
+ struct erofs_fscache_io *io = kzalloc_obj(*io);
if (!io)
return NULL;
@@ -417,7 +417,7 @@ static int erofs_fscache_init_domain(struct super_block *sb)
struct erofs_domain *domain;
struct erofs_sb_info *sbi = EROFS_SB(sb);
- domain = kzalloc_obj(struct erofs_domain, GFP_KERNEL);
+ domain = kzalloc_obj(struct erofs_domain);
if (!domain)
return -ENOMEM;
@@ -482,7 +482,7 @@ static struct erofs_fscache *erofs_fscache_acquire_cookie(struct super_block *sb
struct inode *inode;
int ret;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
INIT_LIST_HEAD(&ctx->node);
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index a333456c7d5d..d4995686ac6c 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -226,7 +226,7 @@ static int erofs_scan_devices(struct super_block *sb,
}
} else {
for (id = 0; id < ondisk_extradevs; id++) {
- dif = kzalloc_obj(*dif, GFP_KERNEL);
+ dif = kzalloc_obj(*dif);
if (!dif) {
err = -ENOMEM;
break;
@@ -495,7 +495,7 @@ static int erofs_fc_parse_param(struct fs_context *fc,
return -EINVAL;
break;
case Opt_device:
- dif = kzalloc_obj(*dif, GFP_KERNEL);
+ dif = kzalloc_obj(*dif);
if (!dif)
return -ENOMEM;
dif->path = kstrdup(param->string, GFP_KERNEL);
@@ -903,11 +903,11 @@ static int erofs_init_fs_context(struct fs_context *fc)
{
struct erofs_sb_info *sbi;
- sbi = kzalloc_obj(*sbi, GFP_KERNEL);
+ sbi = kzalloc_obj(*sbi);
if (!sbi)
return -ENOMEM;
- sbi->devs = kzalloc_obj(struct erofs_dev_context, GFP_KERNEL);
+ sbi->devs = kzalloc_obj(struct erofs_dev_context);
if (!sbi->devs) {
kfree(sbi);
return -ENOMEM;
diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
index 5997a7ae19d9..211aa9336e5a 100644
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@ -498,7 +498,7 @@ int erofs_xattr_prefixes_init(struct super_block *sb)
if (!sbi->xattr_prefix_count)
return 0;
- pfs = kzalloc_objs(*pfs, sbi->xattr_prefix_count, GFP_KERNEL);
+ pfs = kzalloc_objs(*pfs, sbi->xattr_prefix_count);
if (!pfs)
return -ENOMEM;
diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c
index 9a15088744f0..0facb0e77e33 100644
--- a/fs/erofs/zutil.c
+++ b/fs/erofs/zutil.c
@@ -79,7 +79,7 @@ int z_erofs_gbuf_growsize(unsigned int nrpages)
for (i = 0; i < z_erofs_gbuf_count; ++i) {
gbuf = &z_erofs_gbufpool[i];
- tmp_pages = kzalloc_objs(*tmp_pages, nrpages, GFP_KERNEL);
+ tmp_pages = kzalloc_objs(*tmp_pages, nrpages);
if (!tmp_pages)
goto out;
@@ -131,7 +131,7 @@ int __init z_erofs_gbuf_init(void)
/* The last (special) global buffer is the reserved buffer */
total += !!z_erofs_rsv_nrpages;
- z_erofs_gbufpool = kzalloc_objs(*z_erofs_gbufpool, total, GFP_KERNEL);
+ z_erofs_gbufpool = kzalloc_objs(*z_erofs_gbufpool, total);
if (!z_erofs_gbufpool)
return -ENOMEM;