diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:06:51 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (patch) | |
| tree | 515dca34daa8d18ec26c2c3da3096c6c23955c95 /fs | |
| parent | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (diff) | |
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument
This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.
As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/afs/addr_list.c | 2 | ||||
| -rw-r--r-- | fs/afs/addr_prefs.c | 2 | ||||
| -rw-r--r-- | fs/afs/fsclient.c | 2 | ||||
| -rw-r--r-- | fs/afs/server_list.c | 2 | ||||
| -rw-r--r-- | fs/afs/vl_list.c | 4 | ||||
| -rw-r--r-- | fs/afs/xattr.c | 2 | ||||
| -rw-r--r-- | fs/afs/yfsclient.c | 4 | ||||
| -rw-r--r-- | fs/aio.c | 2 | ||||
| -rw-r--r-- | fs/binfmt_elf.c | 2 | ||||
| -rw-r--r-- | fs/binfmt_elf_fdpic.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/inode.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/raid56.c | 2 | ||||
| -rw-r--r-- | fs/ext4/dir.c | 2 | ||||
| -rw-r--r-- | fs/fs-writeback.c | 2 | ||||
| -rw-r--r-- | fs/jffs2/acl.c | 2 | ||||
| -rw-r--r-- | fs/netfs/fscache_volume.c | 2 | ||||
| -rw-r--r-- | fs/nfsd/blocklayout.c | 6 | ||||
| -rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 | ||||
| -rw-r--r-- | fs/ocfs2/journal.c | 2 | ||||
| -rw-r--r-- | fs/ocfs2/slot_map.c | 2 | ||||
| -rw-r--r-- | fs/overlayfs/readdir.c | 2 | ||||
| -rw-r--r-- | fs/overlayfs/util.c | 2 | ||||
| -rw-r--r-- | fs/smb/client/smb2ops.c | 2 | ||||
| -rw-r--r-- | fs/udf/super.c | 2 | ||||
| -rw-r--r-- | fs/xfs/xfs_buf_mem.c | 2 |
25 files changed, 29 insertions, 29 deletions
diff --git a/fs/afs/addr_list.c b/fs/afs/addr_list.c index 26590bfeae91..a936f9ea5610 100644 --- a/fs/afs/addr_list.c +++ b/fs/afs/addr_list.c @@ -66,7 +66,7 @@ struct afs_addr_list *afs_alloc_addrlist(unsigned int nr) if (nr > AFS_MAX_ADDRESSES) nr = AFS_MAX_ADDRESSES; - alist = kzalloc_flex(*alist, addrs, nr, GFP_KERNEL); + alist = kzalloc_flex(*alist, addrs, nr); if (!alist) return NULL; diff --git a/fs/afs/addr_prefs.c b/fs/afs/addr_prefs.c index f5a4fb6f609a..e8c0640f1c5b 100644 --- a/fs/afs/addr_prefs.c +++ b/fs/afs/addr_prefs.c @@ -401,7 +401,7 @@ int afs_proc_addr_prefs_write(struct file *file, char *buf, size_t size) max_prefs = min_t(size_t, (psize - sizeof(*old)) / sizeof(old->prefs[0]), 255); ret = -ENOMEM; - preflist = kmalloc_flex(*preflist, prefs, max_prefs, GFP_KERNEL); + preflist = kmalloc_flex(*preflist, prefs, max_prefs); if (!preflist) goto done; diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index eb3520b9a282..95494d5f2b8a 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@ -2010,7 +2010,7 @@ static int afs_deliver_fs_fetch_acl(struct afs_call *call) size = call->count2 = ntohl(call->tmp); size = round_up(size, 4); - acl = kmalloc_flex(*acl, data, size, GFP_KERNEL); + acl = kmalloc_flex(*acl, data, size); if (!acl) return -ENOMEM; op->acl = acl; diff --git a/fs/afs/server_list.c b/fs/afs/server_list.c index b948df6dddc7..4178d39b2d60 100644 --- a/fs/afs/server_list.c +++ b/fs/afs/server_list.c @@ -51,7 +51,7 @@ struct afs_server_list *afs_alloc_server_list(struct afs_volume *volume, newrep++; } - slist = kzalloc_flex(*slist, servers, nr_servers, GFP_KERNEL); + slist = kzalloc_flex(*slist, servers, nr_servers); if (!slist) goto error; diff --git a/fs/afs/vl_list.c b/fs/afs/vl_list.c index 4f430ae01646..3e4966915ea4 100644 --- a/fs/afs/vl_list.c +++ b/fs/afs/vl_list.c @@ -15,7 +15,7 @@ struct afs_vlserver *afs_alloc_vlserver(const char *name, size_t name_len, struct afs_vlserver *vlserver; static atomic_t debug_ids; - vlserver = kzalloc_flex(*vlserver, name, name_len + 1, GFP_KERNEL); + vlserver = kzalloc_flex(*vlserver, name, name_len + 1); if (vlserver) { refcount_set(&vlserver->ref, 1); rwlock_init(&vlserver->lock); @@ -51,7 +51,7 @@ struct afs_vlserver_list *afs_alloc_vlserver_list(unsigned int nr_servers) { struct afs_vlserver_list *vllist; - vllist = kzalloc_flex(*vllist, servers, nr_servers, GFP_KERNEL); + vllist = kzalloc_flex(*vllist, servers, nr_servers); if (vllist) { refcount_set(&vllist->ref, 1); rwlock_init(&vllist->lock); diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c index af9398d48e39..3770ed236f67 100644 --- a/fs/afs/xattr.c +++ b/fs/afs/xattr.c @@ -75,7 +75,7 @@ static bool afs_make_acl(struct afs_operation *op, { struct afs_acl *acl; - acl = kmalloc_flex(*acl, data, size, GFP_KERNEL); + acl = kmalloc_flex(*acl, data, size); if (!acl) { afs_op_nomem(op); return false; diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c index 9adc2dcde9a7..24fb562ebd33 100644 --- a/fs/afs/yfsclient.c +++ b/fs/afs/yfsclient.c @@ -2048,7 +2048,7 @@ static int yfs_deliver_fs_fetch_opaque_acl(struct afs_call *call) size = round_up(size, 4); if (yacl->flags & YFS_ACL_WANT_ACL) { - acl = kmalloc_flex(*acl, data, size, GFP_KERNEL); + acl = kmalloc_flex(*acl, data, size); if (!acl) return -ENOMEM; yacl->acl = acl; @@ -2080,7 +2080,7 @@ static int yfs_deliver_fs_fetch_opaque_acl(struct afs_call *call) size = round_up(size, 4); if (yacl->flags & YFS_ACL_WANT_VOL_ACL) { - acl = kmalloc_flex(*acl, data, size, GFP_KERNEL); + acl = kmalloc_flex(*acl, data, size); if (!acl) return -ENOMEM; yacl->vol_acl = acl; @@ -693,7 +693,7 @@ static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) new_nr = (table ? table->nr : 1) * 4; spin_unlock(&mm->ioctx_lock); - table = kzalloc_flex(*table, table, new_nr, GFP_KERNEL); + table = kzalloc_flex(*table, table, new_nr); if (!table) return -ENOMEM; diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 49a196721cc7..d9154b2f870a 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1880,7 +1880,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, info->thread->task = dump_task; for (ct = dump_task->signal->core_state->dumper.next; ct; ct = ct->next) { - t = kzalloc_flex(*t, notes, info->thread_notes, GFP_KERNEL); + t = kzalloc_flex(*t, notes, info->thread_notes); if (unlikely(!t)) return 0; diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 526e048e2956..95b1d0852135 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -761,7 +761,7 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params, if (nloads == 0) return -ELIBBAD; - loadmap = kzalloc_flex(*loadmap, segs, nloads, GFP_KERNEL); + loadmap = kzalloc_flex(*loadmap, segs, nloads); if (!loadmap) return -ENOMEM; diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f3ecbca47edb..6efb543f1c24 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1692,7 +1692,7 @@ static bool run_delalloc_compressed(struct btrfs_inode *inode, const blk_opf_t write_flags = wbc_to_write_flags(wbc); nofs_flag = memalloc_nofs_save(); - ctx = kvmalloc_flex(*ctx, chunks, num_chunks, GFP_KERNEL); + ctx = kvmalloc_flex(*ctx, chunks, num_chunks); memalloc_nofs_restore(nofs_flag); if (!ctx) return false; diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 8112122c13e6..b4511f560e92 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -208,7 +208,7 @@ int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info) * Try harder to allocate and fallback to vmalloc to lower the chance * of a failing mount. */ - table = kvzalloc_flex(*table, table, num_entries, GFP_KERNEL); + table = kvzalloc_flex(*table, table, num_entries); if (!table) return -ENOMEM; diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 36dc53df0fb2..28b2a3deb954 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -480,7 +480,7 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, p = &info->root.rb_node; /* Create and allocate the fname structure */ - new_fn = kzalloc_flex(*new_fn, name, ent_name->len + 1, GFP_KERNEL); + new_fn = kzalloc_flex(*new_fn, name, ent_name->len + 1); if (!new_fn) return -ENOMEM; new_fn->hash = hash; diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 22a1996c00cd..8f8069fb76ba 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -724,7 +724,7 @@ bool cleanup_offline_cgwb(struct bdi_writeback *wb) int nr; bool restart = false; - isw = kzalloc_flex(*isw, inodes, WB_MAX_INODES_PER_ISW, GFP_KERNEL); + isw = kzalloc_flex(*isw, inodes, WB_MAX_INODES_PER_ISW); if (!isw) return restart; diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index b7ece06cad80..f0f8a4f57add 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -133,7 +133,7 @@ static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) size_t i; *size = jffs2_acl_size(acl->a_count); - header = kmalloc_flex(*header, a_entries, acl->a_count, GFP_KERNEL); + header = kmalloc_flex(*header, a_entries, acl->a_count); if (!header) return ERR_PTR(-ENOMEM); header->a_version = cpu_to_je32(JFFS2_ACL_VERSION); diff --git a/fs/netfs/fscache_volume.c b/fs/netfs/fscache_volume.c index 57a9f12e79aa..78412fb8548e 100644 --- a/fs/netfs/fscache_volume.c +++ b/fs/netfs/fscache_volume.c @@ -230,7 +230,7 @@ static struct fscache_volume *fscache_alloc_volume(const char *volume_key, if (IS_ERR(cache)) return NULL; - volume = kzalloc_flex(*volume, coherency, coherency_len, GFP_KERNEL); + volume = kzalloc_flex(*volume, coherency, coherency_len); if (!volume) goto err_cache; diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index e3553ccb6ab4..a7cfba29990e 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -131,7 +131,7 @@ nfsd4_block_proc_layoutget(struct svc_rqst *rqstp, struct inode *inode, * layouts, so make sure to zero the whole structure. */ nfserr = nfserrno(-ENOMEM); - bl = kzalloc_flex(*bl, extents, nr_extents_max, GFP_KERNEL); + bl = kzalloc_flex(*bl, extents, nr_extents_max); if (!bl) goto out_error; bl->nr_extents = nr_extents_max; @@ -208,7 +208,7 @@ nfsd4_block_get_device_info_simple(struct super_block *sb, struct pnfs_block_deviceaddr *dev; struct pnfs_block_volume *b; - dev = kzalloc_flex(*dev, volumes, 1, GFP_KERNEL); + dev = kzalloc_flex(*dev, volumes, 1); if (!dev) return -ENOMEM; gdp->gd_device = dev; @@ -319,7 +319,7 @@ nfsd4_block_get_device_info_scsi(struct super_block *sb, const struct pr_ops *ops; int ret; - dev = kzalloc_flex(*dev, volumes, 1, GFP_KERNEL); + dev = kzalloc_flex(*dev, volumes, 1); if (!dev) return -ENOMEM; gdp->gd_device = dev; diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 1bee0870d1c7..41dfba5ab8b8 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -124,7 +124,7 @@ svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, size_t len) { struct svcxdr_tmpbuf *tb; - tb = kmalloc_flex(*tb, buf, len, GFP_KERNEL); + tb = kmalloc_flex(*tb, buf, len); if (!tb) return NULL; tb->next = argp->to_free; diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 6755f38920bc..6a0c038dab5a 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -177,7 +177,7 @@ int ocfs2_recovery_init(struct ocfs2_super *osb) osb->recovery_thread_task = NULL; init_waitqueue_head(&osb->recovery_event); - rm = kzalloc_flex(*rm, rm_entries, osb->max_slots, GFP_KERNEL); + rm = kzalloc_flex(*rm, rm_entries, osb->max_slots); if (!rm) { mlog_errno(-ENOMEM); return -ENOMEM; diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index 3ea14f00e84a..8187137b8417 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c @@ -425,7 +425,7 @@ int ocfs2_init_slot_info(struct ocfs2_super *osb) struct inode *inode = NULL; struct ocfs2_slot_info *si; - si = kzalloc_flex(*si, si_slots, osb->max_slots, GFP_KERNEL); + si = kzalloc_flex(*si, si_slots, osb->max_slots); if (!si) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index a4271e5fb8e6..1dcc75b3a90f 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c @@ -180,7 +180,7 @@ static struct ovl_cache_entry *ovl_cache_entry_new(struct ovl_readdir_data *rdd, { struct ovl_cache_entry *p; - p = kmalloc_flex(*p, name, len + 1, GFP_KERNEL); + p = kmalloc_flex(*p, name, len + 1); if (!p) return NULL; diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index 4eeafd943fb9..3f1b763a8bb4 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -143,7 +143,7 @@ struct ovl_entry *ovl_alloc_entry(unsigned int numlower) { struct ovl_entry *oe; - oe = kzalloc_flex(*oe, __lowerstack, numlower, GFP_KERNEL); + oe = kzalloc_flex(*oe, __lowerstack, numlower); if (oe) oe->__numlower = numlower; diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 1ba66e1f6ffa..fea9a35caa57 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -1888,7 +1888,7 @@ retry: goto out; } - cc_req = kzalloc_flex(*cc_req, Chunks, chunk_count, GFP_KERNEL); + cc_req = kzalloc_flex(*cc_req, Chunks, chunk_count); if (!cc_req) { rc = -ENOMEM; goto out; diff --git a/fs/udf/super.c b/fs/udf/super.c index e4220ce08742..ccbf16f50ba5 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1047,7 +1047,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index) struct udf_bitmap *bitmap; int nr_groups = udf_compute_nr_groups(sb, index); - bitmap = kvzalloc_flex(*bitmap, s_block_bitmap, nr_groups, GFP_KERNEL); + bitmap = kvzalloc_flex(*bitmap, s_block_bitmap, nr_groups); if (!bitmap) return NULL; diff --git a/fs/xfs/xfs_buf_mem.c b/fs/xfs/xfs_buf_mem.c index e0529f380a77..b0b3696bf599 100644 --- a/fs/xfs/xfs_buf_mem.c +++ b/fs/xfs/xfs_buf_mem.c @@ -58,7 +58,7 @@ xmbuf_alloc( struct xfs_buftarg *btp; int error; - btp = kzalloc_flex(*btp, bt_cache, 1, GFP_KERNEL); + btp = kzalloc_flex(*btp, bt_cache, 1); if (!btp) return -ENOMEM; |
