diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /fs | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
| download | linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip | |
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/aio.c | 3 | ||||
| -rw-r--r-- | fs/binfmt_elf.c | 3 | ||||
| -rw-r--r-- | fs/btrfs/ioctl.c | 3 | ||||
| -rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 3 | ||||
| -rw-r--r-- | fs/btrfs/zoned.c | 3 | ||||
| -rw-r--r-- | fs/cachefiles/ondemand.c | 3 | ||||
| -rw-r--r-- | fs/coredump.c | 3 | ||||
| -rw-r--r-- | fs/erofs/xattr.c | 3 | ||||
| -rw-r--r-- | fs/exfat/balloc.c | 3 | ||||
| -rw-r--r-- | fs/ext2/super.c | 3 | ||||
| -rw-r--r-- | fs/ext4/orphan.c | 3 | ||||
| -rw-r--r-- | fs/fhandle.c | 6 | ||||
| -rw-r--r-- | fs/jbd2/journal.c | 3 | ||||
| -rw-r--r-- | fs/jffs2/summary.c | 12 | ||||
| -rw-r--r-- | fs/jffs2/xattr.c | 3 | ||||
| -rw-r--r-- | fs/mbcache.c | 3 | ||||
| -rw-r--r-- | fs/nfsd/nfs4proc.c | 3 | ||||
| -rw-r--r-- | fs/nfsd/nfs4state.c | 6 | ||||
| -rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 6 | ||||
| -rw-r--r-- | fs/ocfs2/journal.c | 3 | ||||
| -rw-r--r-- | fs/ocfs2/slot_map.c | 3 | ||||
| -rw-r--r-- | fs/orangefs/orangefs-bufmap.c | 3 | ||||
| -rw-r--r-- | fs/pstore/ram.c | 3 | ||||
| -rw-r--r-- | fs/select.c | 3 | ||||
| -rw-r--r-- | fs/smb/client/misc.c | 3 | ||||
| -rw-r--r-- | fs/xfs/xfs_super.c | 3 | ||||
| -rw-r--r-- | fs/xfs/xfs_zone_gc.c | 3 | ||||
| -rw-r--r-- | fs/zonefs/super.c | 6 |
28 files changed, 35 insertions, 70 deletions
@@ -510,8 +510,7 @@ static int aio_setup_ring(struct kioctx *ctx, unsigned int nr_events) ctx->ring_folios = ctx->internal_folios; if (nr_pages > AIO_RING_PAGES) { - ctx->ring_folios = kzalloc_objs(struct folio *, nr_pages, - GFP_KERNEL); + ctx->ring_folios = kzalloc_objs(struct folio *, nr_pages); if (!ctx->ring_folios) { put_aio_ring_file(ctx); return -ENOMEM; diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index d9154b2f870a..8e89cc5b2820 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1873,8 +1873,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, /* * Allocate a structure for each thread. */ - info->thread = kzalloc_flex(*info->thread, notes, info->thread_notes, - GFP_KERNEL); + info->thread = kzalloc_flex(*info->thread, notes, info->thread_notes); if (unlikely(!info->thread)) return 0; diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2bd0178c95a2..ae2173235c4d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -733,8 +733,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, ret = get_anon_bdev(&pending_snapshot->anon_dev); if (ret < 0) goto free_pending; - pending_snapshot->root_item = kzalloc_obj(struct btrfs_root_item, - GFP_KERNEL); + pending_snapshot->root_item = kzalloc_obj(struct btrfs_root_item); pending_snapshot->path = btrfs_alloc_path(); if (!pending_snapshot->root_item || !pending_snapshot->path) { ret = -ENOMEM; diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index fa177070d2d0..90e50e62dd17 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -117,8 +117,7 @@ static void btrfs_free_dummy_device(struct btrfs_device *dev) struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(u32 nodesize, u32 sectorsize) { - struct btrfs_fs_info *fs_info = kzalloc_obj(struct btrfs_fs_info, - GFP_KERNEL); + struct btrfs_fs_info *fs_info = kzalloc_obj(struct btrfs_fs_info); if (!fs_info) return fs_info; diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index a27db827d87b..39930d99943c 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -454,8 +454,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache) goto out; } - zones = kvzalloc_objs(struct blk_zone, BTRFS_REPORT_NR_ZONES, - GFP_KERNEL); + zones = kvzalloc_objs(struct blk_zone, BTRFS_REPORT_NR_ZONES); if (!zones) { ret = -ENOMEM; goto out; diff --git a/fs/cachefiles/ondemand.c b/fs/cachefiles/ondemand.c index b251fff2bed0..0849eaf583cd 100644 --- a/fs/cachefiles/ondemand.c +++ b/fs/cachefiles/ondemand.c @@ -734,8 +734,7 @@ int cachefiles_ondemand_init_obj_info(struct cachefiles_object *object, if (!cachefiles_in_ondemand_mode(volume->cache)) return 0; - object->ondemand = kzalloc_obj(struct cachefiles_ondemand_info, - GFP_KERNEL); + object->ondemand = kzalloc_obj(struct cachefiles_ondemand_info); if (!object->ondemand) return -ENOMEM; diff --git a/fs/coredump.c b/fs/coredump.c index 55b700517e9f..29df8aa19e2e 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1736,8 +1736,7 @@ static bool dump_vma_snapshot(struct coredump_params *cprm) gate_vma = get_gate_vma(mm); cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0); - cprm->vma_meta = kvmalloc_objs(*cprm->vma_meta, cprm->vma_count, - GFP_KERNEL); + cprm->vma_meta = kvmalloc_objs(*cprm->vma_meta, cprm->vma_count); if (!cprm->vma_meta) { mmap_write_unlock(mm); return false; diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c index 211aa9336e5a..c411df5d9dfc 100644 --- a/fs/erofs/xattr.c +++ b/fs/erofs/xattr.c @@ -85,8 +85,7 @@ static int erofs_init_inode_xattrs(struct inode *inode) } vi->xattr_name_filter = le32_to_cpu(ih->h_name_filter); vi->xattr_shared_count = ih->h_shared_count; - vi->xattr_shared_xattrs = kmalloc_objs(uint, vi->xattr_shared_count, - GFP_KERNEL); + vi->xattr_shared_xattrs = kmalloc_objs(uint, vi->xattr_shared_count); if (!vi->xattr_shared_xattrs) { erofs_put_metabuf(&buf); ret = -ENOMEM; diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index 8dd9e39f8ccf..3a32f49f9dbd 100644 --- a/fs/exfat/balloc.c +++ b/fs/exfat/balloc.c @@ -96,8 +96,7 @@ static int exfat_allocate_bitmap(struct super_block *sb, } sbi->map_sectors = ((need_map_size - 1) >> (sb->s_blocksize_bits)) + 1; - sbi->vol_amap = kvmalloc_objs(struct buffer_head *, sbi->map_sectors, - GFP_KERNEL); + sbi->vol_amap = kvmalloc_objs(struct buffer_head *, sbi->map_sectors); if (!sbi->vol_amap) return -ENOMEM; diff --git a/fs/ext2/super.c b/fs/ext2/super.c index b20a6eb6822b..603f2641fe10 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1122,8 +1122,7 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc) } db_count = (sbi->s_groups_count + EXT2_DESC_PER_BLOCK(sb) - 1) / EXT2_DESC_PER_BLOCK(sb); - sbi->s_group_desc = kvmalloc_objs(struct buffer_head *, db_count, - GFP_KERNEL); + sbi->s_group_desc = kvmalloc_objs(struct buffer_head *, db_count); if (sbi->s_group_desc == NULL) { ret = -ENOMEM; ext2_msg(sb, KERN_ERR, "error: not enough memory"); diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c index 2dbaf3c01168..c0022f0bff87 100644 --- a/fs/ext4/orphan.c +++ b/fs/ext4/orphan.c @@ -598,8 +598,7 @@ int ext4_init_orphan_info(struct super_block *sb) } oi->of_blocks = inode->i_size >> sb->s_blocksize_bits; oi->of_csum_seed = EXT4_I(inode)->i_csum_seed; - oi->of_binfo = kvmalloc_objs(struct ext4_orphan_block, oi->of_blocks, - GFP_KERNEL); + oi->of_binfo = kvmalloc_objs(struct ext4_orphan_block, oi->of_blocks); if (!oi->of_binfo) { ret = -ENOMEM; goto out_put; diff --git a/fs/fhandle.c b/fs/fhandle.c index fa4053f9e015..642e3d569497 100644 --- a/fs/fhandle.c +++ b/fs/fhandle.c @@ -46,8 +46,7 @@ static long do_sys_name_to_handle(const struct path *path, if (f_handle.handle_bytes > MAX_HANDLE_SZ) return -EINVAL; - handle = kzalloc_flex(*handle, f_handle, f_handle.handle_bytes, - GFP_KERNEL); + handle = kzalloc_flex(*handle, f_handle, f_handle.handle_bytes); if (!handle) return -ENOMEM; @@ -368,8 +367,7 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh, if (retval) goto out_path; - handle = kmalloc_flex(*handle, f_handle, f_handle.handle_bytes, - GFP_KERNEL); + handle = kmalloc_flex(*handle, f_handle, f_handle.handle_bytes); if (!handle) { retval = -ENOMEM; goto out_path; diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 0fbd9a47ae67..cb2c529a8f1b 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2268,8 +2268,7 @@ jbd2_journal_initialize_fast_commit(journal_t *journal) /* Are we called twice? */ WARN_ON(journal->j_fc_wbuf != NULL); - journal->j_fc_wbuf = kmalloc_objs(struct buffer_head *, num_fc_blks, - GFP_KERNEL); + journal->j_fc_wbuf = kmalloc_objs(struct buffer_head *, num_fc_blks); if (!journal->j_fc_wbuf) return -ENOMEM; diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index d0b689ee8d32..4521a7723f30 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -115,8 +115,7 @@ int jffs2_sum_add_padding_mem(struct jffs2_summary *s, uint32_t size) int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, uint32_t ofs) { - struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem, - GFP_KERNEL); + struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem); if (!temp) return -ENOMEM; @@ -264,8 +263,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, switch (je16_to_cpu(node->u.nodetype)) { case JFFS2_NODETYPE_INODE: { struct jffs2_sum_inode_mem *temp = - kmalloc_obj(struct jffs2_sum_inode_mem, - GFP_KERNEL); + kmalloc_obj(struct jffs2_sum_inode_mem); if (!temp) goto no_mem; @@ -316,8 +314,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, #ifdef CONFIG_JFFS2_FS_XATTR case JFFS2_NODETYPE_XATTR: { 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) goto no_mem; @@ -332,8 +329,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, } case JFFS2_NODETYPE_XREF: { 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) goto no_mem; temp->nodetype = node->r.nodetype; diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index 4452e6837b34..6b4f68593c29 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c @@ -784,8 +784,7 @@ int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING)); - xref_tmphash = kzalloc_objs(struct jffs2_xattr_ref *, XREF_TMPHASH_SIZE, - GFP_KERNEL); + xref_tmphash = kzalloc_objs(struct jffs2_xattr_ref *, XREF_TMPHASH_SIZE); if (!xref_tmphash) return -ENOMEM; diff --git a/fs/mbcache.c b/fs/mbcache.c index d6707fbdeb50..480d02d6ebf0 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -365,8 +365,7 @@ struct mb_cache *mb_cache_create(int bucket_bits) cache->c_max_entries = bucket_count << 4; INIT_LIST_HEAD(&cache->c_list); spin_lock_init(&cache->c_list_lock); - cache->c_hash = kmalloc_objs(struct hlist_bl_head, bucket_count, - GFP_KERNEL); + cache->c_hash = kmalloc_objs(struct hlist_bl_head, bucket_count); if (!cache->c_hash) { kfree(cache); goto err_out; diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 1d7b50c2cc3d..6880c5c520e7 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2171,8 +2171,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (atomic_inc_return(&nn->pending_async_copies) > (int)rqstp->rq_pool->sp_nrthreads) goto out_dec_async_copy_err; - async_copy->cp_src = kmalloc_obj(*async_copy->cp_src, - GFP_KERNEL); + async_copy->cp_src = kmalloc_obj(*async_copy->cp_src); if (!async_copy->cp_src) goto out_dec_async_copy_err; if (!nfs4_init_copy_state(nn, copy)) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 90dc841c2157..74f50670cbe7 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -8959,12 +8959,10 @@ static int nfs4_state_create_net(struct net *net) struct nfsd_net *nn = net_generic(net, nfsd_net_id); int i; - nn->conf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE, - GFP_KERNEL); + nn->conf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE); if (!nn->conf_id_hashtbl) goto err; - nn->unconf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE, - GFP_KERNEL); + nn->unconf_id_hashtbl = kmalloc_objs(struct list_head, CLIENT_HASH_SIZE); if (!nn->unconf_id_hashtbl) goto err_unconf_id; nn->sessionid_hashtbl = kmalloc_objs(struct list_head, diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index ace7debb2f0d..fe1949578336 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -1677,8 +1677,7 @@ static int o2hb_map_slot_data(struct o2hb_region *reg) if (reg->hr_tmp_block == NULL) return -ENOMEM; - reg->hr_slots = kzalloc_objs(struct o2hb_disk_slot, reg->hr_blocks, - GFP_KERNEL); + reg->hr_slots = kzalloc_objs(struct o2hb_disk_slot, reg->hr_blocks); if (reg->hr_slots == NULL) return -ENOMEM; @@ -1694,8 +1693,7 @@ static int o2hb_map_slot_data(struct o2hb_region *reg) "at %u blocks per page\n", reg->hr_num_pages, reg->hr_blocks, spp); - reg->hr_slot_data = kzalloc_objs(struct page *, reg->hr_num_pages, - GFP_KERNEL); + reg->hr_slot_data = kzalloc_objs(struct page *, reg->hr_num_pages); if (!reg->hr_slot_data) return -ENOMEM; diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 6a0c038dab5a..4c86a9d46870 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -114,8 +114,7 @@ int ocfs2_compute_replay_slots(struct ocfs2_super *osb) if (osb->replay_map) return 0; - replay_map = kzalloc_flex(*replay_map, rm_replay_slots, osb->max_slots, - GFP_KERNEL); + replay_map = kzalloc_flex(*replay_map, rm_replay_slots, osb->max_slots); if (!replay_map) { mlog_errno(-ENOMEM); return -ENOMEM; diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index 8187137b8417..3aa4a082ea03 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c @@ -385,8 +385,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb, trace_ocfs2_map_slot_buffers(bytes, si->si_blocks); - si->si_bh = kzalloc_objs(struct buffer_head *, si->si_blocks, - GFP_KERNEL); + si->si_bh = kzalloc_objs(struct buffer_head *, si->si_blocks); if (!si->si_bh) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c index c54266c75eed..5dd2708cce94 100644 --- a/fs/orangefs/orangefs-bufmap.c +++ b/fs/orangefs/orangefs-bufmap.c @@ -219,8 +219,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) goto out_free_bufmap; bufmap->desc_array = - kzalloc_objs(struct orangefs_bufmap_desc, bufmap->desc_count, - GFP_KERNEL); + kzalloc_objs(struct orangefs_bufmap_desc, bufmap->desc_count); if (!bufmap->desc_array) goto out_free_index_array; diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index c1cbf2fd1c0f..d1f895e57a95 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -232,8 +232,7 @@ static ssize_t ramoops_pstore_read(struct pstore_record *record) */ struct persistent_ram_zone *tmp_prz, *prz_next; - tmp_prz = kzalloc_obj(struct persistent_ram_zone, - GFP_KERNEL); + tmp_prz = kzalloc_obj(struct persistent_ram_zone); if (!tmp_prz) return -ENOMEM; prz = tmp_prz; diff --git a/fs/select.c b/fs/select.c index 57b0af64cc1e..e0244dbe4429 100644 --- a/fs/select.c +++ b/fs/select.c @@ -993,8 +993,7 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, todo -= walk->len; len = min(todo, POLLFD_PER_PAGE); - walk = walk->next = kmalloc_flex(*walk, entries, len, - GFP_KERNEL); + walk = walk->next = kmalloc_flex(*walk, entries, len); if (!walk) { err = -ENOMEM; goto out_fds; diff --git a/fs/smb/client/misc.c b/fs/smb/client/misc.c index aec6f2c52408..22cde46309fe 100644 --- a/fs/smb/client/misc.c +++ b/fs/smb/client/misc.c @@ -673,8 +673,7 @@ parse_dfs_referrals(struct get_dfs_referral_rsp *rsp, u32 rsp_size, cifs_dbg(FYI, "num_referrals: %d dfs flags: 0x%x ...\n", *num_of_nodes, le32_to_cpu(rsp->DFSFlags)); - *target_nodes = kzalloc_objs(struct dfs_info3_param, *num_of_nodes, - GFP_KERNEL); + *target_nodes = kzalloc_objs(struct dfs_info3_param, *num_of_nodes); if (*target_nodes == NULL) { rc = -ENOMEM; goto parse_DFS_referrals_exit; diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 011525a2cbc8..abc45f860a73 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -2239,8 +2239,7 @@ xfs_init_fs_context( if (!mp) return -ENOMEM; #ifdef DEBUG - mp->m_errortag = kzalloc_objs(*mp->m_errortag, XFS_ERRTAG_MAX, - GFP_KERNEL); + mp->m_errortag = kzalloc_objs(*mp->m_errortag, XFS_ERRTAG_MAX); if (!mp->m_errortag) { kfree(mp); return -ENOMEM; diff --git a/fs/xfs/xfs_zone_gc.c b/fs/xfs/xfs_zone_gc.c index 8604c8a2d86b..48c6cf584447 100644 --- a/fs/xfs/xfs_zone_gc.c +++ b/fs/xfs/xfs_zone_gc.c @@ -202,8 +202,7 @@ xfs_zone_gc_data_alloc( data = kzalloc_obj(*data); if (!data) return NULL; - data->iter.recs = kzalloc_objs(*data->iter.recs, XFS_ZONE_GC_RECS, - GFP_KERNEL); + data->iter.recs = kzalloc_objs(*data->iter.recs, XFS_ZONE_GC_RECS); if (!data->iter.recs) goto out_free_data; diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 9b7676553751..e83b2ec5e49f 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -903,8 +903,7 @@ static int zonefs_get_zone_info(struct zonefs_zone_data *zd) struct block_device *bdev = zd->sb->s_bdev; int ret; - zd->zones = kvzalloc_objs(struct blk_zone, bdev_nr_zones(bdev), - GFP_KERNEL); + zd->zones = kvzalloc_objs(struct blk_zone, bdev_nr_zones(bdev)); if (!zd->zones) return -ENOMEM; @@ -948,8 +947,7 @@ static int zonefs_init_zgroup(struct super_block *sb, if (!zgroup->g_nr_zones) return 0; - zgroup->g_zones = kvzalloc_objs(struct zonefs_zone, zgroup->g_nr_zones, - GFP_KERNEL); + zgroup->g_zones = kvzalloc_objs(struct zonefs_zone, zgroup->g_nr_zones); if (!zgroup->g_zones) return -ENOMEM; |
