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/jffs2 | |
| 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/jffs2')
| -rw-r--r-- | fs/jffs2/erase.c | 2 | ||||
| -rw-r--r-- | fs/jffs2/readinode.c | 2 | ||||
| -rw-r--r-- | fs/jffs2/scan.c | 2 | ||||
| -rw-r--r-- | fs/jffs2/summary.c | 6 | ||||
| -rw-r--r-- | fs/jffs2/super.c | 2 | ||||
| -rw-r--r-- | fs/jffs2/wbuf.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index d451c8a1fdac..a99ee831bab8 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -43,7 +43,7 @@ static void jffs2_erase_block(struct jffs2_sb_info *c, jffs2_dbg(1, "%s(): erase block %#08x (range %#08x-%#08x)\n", __func__, jeb->offset, jeb->offset, jeb->offset + c->sector_size); - instr = kzalloc_obj(struct erase_info, GFP_KERNEL); + instr = kzalloc_obj(struct erase_info); if (!instr) { pr_warn("kzalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n"); mutex_lock(&c->erase_free_sem); diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index eeca922d4da4..1caabff9dc91 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -1392,7 +1392,7 @@ int jffs2_do_read_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) { struct jffs2_raw_inode n; - struct jffs2_inode_info *f = kzalloc_obj(*f, GFP_KERNEL); + struct jffs2_inode_info *f = kzalloc_obj(*f); int ret; if (!f) diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 39063e2131d6..06e494797724 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -132,7 +132,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) } if (jffs2_sum_active()) { - s = kzalloc_obj(struct jffs2_summary, GFP_KERNEL); + s = kzalloc_obj(struct jffs2_summary); if (!s) { JFFS2_WARNING("Can't allocate memory for summary\n"); ret = -ENOMEM; diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index b9df829eff56..d0b689ee8d32 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -27,7 +27,7 @@ int jffs2_sum_init(struct jffs2_sb_info *c) { uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); - c->summary = kzalloc_obj(struct jffs2_summary, GFP_KERNEL); + c->summary = kzalloc_obj(struct jffs2_summary); if (!c->summary) { JFFS2_WARNING("Can't allocate memory for summary information!\n"); @@ -160,7 +160,7 @@ int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, { struct jffs2_sum_xattr_mem *temp; - temp = kmalloc_obj(struct jffs2_sum_xattr_mem, GFP_KERNEL); + temp = kmalloc_obj(struct jffs2_sum_xattr_mem); if (!temp) return -ENOMEM; @@ -178,7 +178,7 @@ int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, u { struct jffs2_sum_xref_mem *temp; - temp = kmalloc_obj(struct jffs2_sum_xref_mem, GFP_KERNEL); + temp = kmalloc_obj(struct jffs2_sum_xref_mem); if (!temp) return -ENOMEM; diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 48fbf1594ce8..81396a092ba8 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -311,7 +311,7 @@ static int jffs2_init_fs_context(struct fs_context *fc) { struct jffs2_sb_info *ctx; - ctx = kzalloc_obj(struct jffs2_sb_info, GFP_KERNEL); + ctx = kzalloc_obj(struct jffs2_sb_info); if (!ctx) return -ENOMEM; diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 9775b9b84504..8ff7a0b6add2 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -92,7 +92,7 @@ static void jffs2_wbuf_dirties_inode(struct jffs2_sb_info *c, uint32_t ino) if (jffs2_wbuf_pending_for_ino(c, ino)) return; - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); if (!new) { jffs2_dbg(1, "No memory to allocate inodirty. Fallback to all considered dirty\n"); jffs2_clear_wbuf_ino_list(c); |
