diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 03:37:42 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 04:09:51 +0300 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /fs | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.xz | |
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')
307 files changed, 576 insertions, 576 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index b9872016deae..0a1c4f7cb001 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -90,7 +90,7 @@ static int v9fs_get_tree(struct fs_context *fc) p9_debug(P9_DEBUG_VFS, "\n"); - v9ses = kzalloc_obj(struct v9fs_session_info, GFP_KERNEL); + v9ses = kzalloc_obj(struct v9fs_session_info); if (!v9ses) return -ENOMEM; @@ -308,7 +308,7 @@ static int v9fs_init_fs_context(struct fs_context *fc) { struct v9fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c index 366fb93c7b38..493500f37cb9 100644 --- a/fs/adfs/dir.c +++ b/fs/adfs/dir.c @@ -108,7 +108,7 @@ int adfs_dir_read_buffers(struct super_block *sb, u32 indaddr, if (dir->bhs != dir->bh) return -EINVAL; - bhs = kzalloc_objs(*bhs, num, GFP_KERNEL); + bhs = kzalloc_objs(*bhs, num); if (!bhs) return -ENOMEM; diff --git a/fs/adfs/map.c b/fs/adfs/map.c index 9e24e212b3e1..9d535a2ca2d1 100644 --- a/fs/adfs/map.c +++ b/fs/adfs/map.c @@ -373,7 +373,7 @@ struct adfs_discmap *adfs_read_map(struct super_block *sb, struct adfs_discrecor ((nzones > 1) ? ADFS_DR_SIZE_BITS : 0); map_addr = signed_asl(map_addr, asb->s_map2blk); - dm = kmalloc_objs(*dm, nzones, GFP_KERNEL); + dm = kmalloc_objs(*dm, nzones); if (dm == NULL) { adfs_error(sb, "not enough memory"); return ERR_PTR(-ENOMEM); diff --git a/fs/adfs/super.c b/fs/adfs/super.c index a8e73e980abb..2c5b2076acf9 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c @@ -437,7 +437,7 @@ static int adfs_init_fs_context(struct fs_context *fc) { struct adfs_sb_info *asb; - asb = kzalloc_obj(struct adfs_sb_info, GFP_KERNEL); + asb = kzalloc_obj(struct adfs_sb_info); if (!asb) return -ENOMEM; diff --git a/fs/affs/dir.c b/fs/affs/dir.c index 39b6ddc4e4b1..5c8d83387a39 100644 --- a/fs/affs/dir.c +++ b/fs/affs/dir.c @@ -36,7 +36,7 @@ static int affs_dir_open(struct inode *inode, struct file *file) { struct affs_dir_data *data; - data = kzalloc_obj(struct affs_dir_data, GFP_KERNEL); + data = kzalloc_obj(struct affs_dir_data); if (!data) return -ENOMEM; file->private_data = data; diff --git a/fs/affs/super.c b/fs/affs/super.c index 1a2f72fea1ab..8451647f3fea 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -327,7 +327,7 @@ static int affs_fill_super(struct super_block *sb, struct fs_context *fc) sb->s_time_min = sys_tz.tz_minuteswest * 60 + AFFS_EPOCH_DELTA; sb->s_time_max = 86400LL * U32_MAX + 86400 + sb->s_time_min; - sbi = kzalloc_obj(struct affs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct affs_sb_info); if (!sbi) return -ENOMEM; @@ -615,7 +615,7 @@ static int affs_init_fs_context(struct fs_context *fc) { struct affs_context *ctx; - ctx = kzalloc_obj(struct affs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct affs_context); if (!ctx) return -ENOMEM; diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 4331bf8e1dbd..9738684dbdd2 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c @@ -134,7 +134,7 @@ static struct afs_cell *afs_alloc_cell(struct afs_net *net, _enter("%*.*s,%s", namelen, namelen, name, addresses); - cell = kzalloc_obj(struct afs_cell, GFP_KERNEL); + cell = kzalloc_obj(struct afs_cell); if (!cell) { _leave(" = -ENOMEM"); return ERR_PTR(-ENOMEM); diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index a32e7c2864d2..322a80b43f32 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -339,7 +339,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc_obj(struct afs_uuid, GFP_KERNEL); + call->request = kmalloc_obj(struct afs_uuid); if (!call->request) return -ENOMEM; @@ -456,7 +456,7 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call) } _debug("unmarshall UUID"); - call->request = kmalloc_obj(struct afs_uuid, GFP_KERNEL); + call->request = kmalloc_obj(struct afs_uuid); if (!call->request) return -ENOMEM; diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 6f7380f25365..e778a575e1ca 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -785,7 +785,7 @@ static struct inode *afs_do_lookup(struct inode *dir, struct dentry *dentry) _enter("{%lu},%p{%pd},", dir->i_ino, dentry, dentry); - cookie = kzalloc_obj(struct afs_lookup_cookie, GFP_KERNEL); + cookie = kzalloc_obj(struct afs_lookup_cookie); if (!cookie) return ERR_PTR(-ENOMEM); @@ -2094,7 +2094,7 @@ static int afs_rename(struct mnt_idmap *idmap, struct inode *old_dir, goto error; ret = -ENOMEM; - op->more_files = kvzalloc_objs(struct afs_vnode_param, 2, GFP_KERNEL); + op->more_files = kvzalloc_objs(struct afs_vnode_param, 2); if (!op->more_files) goto error; diff --git a/fs/afs/dir_silly.c b/fs/afs/dir_silly.c index f77bed45e808..a748fd133faf 100644 --- a/fs/afs/dir_silly.c +++ b/fs/afs/dir_silly.c @@ -69,7 +69,7 @@ static int afs_do_silly_rename(struct afs_vnode *dvnode, struct afs_vnode *vnode if (IS_ERR(op)) return PTR_ERR(op); - op->more_files = kvzalloc_objs(struct afs_vnode_param, 2, GFP_KERNEL); + op->more_files = kvzalloc_objs(struct afs_vnode_param, 2); if (!op->more_files) { afs_put_operation(op); return -ENOMEM; diff --git a/fs/afs/file.c b/fs/afs/file.c index 5c429a746d76..f609366fd2ac 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -86,7 +86,7 @@ int afs_cache_wb_key(struct afs_vnode *vnode, struct afs_file *af) { struct afs_wb_key *wbk, *p; - wbk = kzalloc_obj(struct afs_wb_key, GFP_KERNEL); + wbk = kzalloc_obj(struct afs_wb_key); if (!wbk) return -ENOMEM; refcount_set(&wbk->usage, 2); @@ -130,7 +130,7 @@ int afs_open(struct inode *inode, struct file *file) goto error; } - af = kzalloc_obj(*af, GFP_KERNEL); + af = kzalloc_obj(*af); if (!af) { ret = -ENOMEM; goto error_key; diff --git a/fs/afs/fs_operation.c b/fs/afs/fs_operation.c index 0ffd19f5279d..c0dbbc6d3716 100644 --- a/fs/afs/fs_operation.c +++ b/fs/afs/fs_operation.c @@ -21,7 +21,7 @@ struct afs_operation *afs_alloc_operation(struct key *key, struct afs_volume *vo _enter(""); - op = kzalloc_obj(*op, GFP_KERNEL); + op = kzalloc_obj(*op); if (!op) return ERR_PTR(-ENOMEM); diff --git a/fs/afs/fs_probe.c b/fs/afs/fs_probe.c index 0100ce4c62a0..a91ad1938d07 100644 --- a/fs/afs/fs_probe.c +++ b/fs/afs/fs_probe.c @@ -244,7 +244,7 @@ int afs_fs_probe_fileserver(struct afs_net *net, struct afs_server *server, _enter("%pU", &server->uuid); - estate = kzalloc_obj(*estate, GFP_KERNEL); + estate = kzalloc_obj(*estate); if (!estate) return -ENOMEM; diff --git a/fs/afs/main.c b/fs/afs/main.c index 7e09bf7aa03b..7a883c59976f 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -93,7 +93,7 @@ static int __net_init afs_net_init(struct net *net_ns) atomic_set(&net->servers_outstanding, 1); ret = -ENOMEM; - sysnames = kzalloc_obj(*sysnames, GFP_KERNEL); + sysnames = kzalloc_obj(*sysnames); if (!sysnames) goto error_sysnames; sysnames->subs[0] = (char *)&afs_init_sysname; diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 52e8195ef2b8..a9cc5cdb4ca2 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -572,7 +572,7 @@ static int afs_proc_sysname_write(struct file *file, char *buf, size_t size) char *s, *p, *sub; int ret, len; - sysnames = kzalloc_obj(*sysnames, GFP_KERNEL); + sysnames = kzalloc_obj(*sysnames); if (!sysnames) return -ENOMEM; refcount_set(&sysnames->usage, 1); diff --git a/fs/afs/server.c b/fs/afs/server.c index 8777c566d12d..0fe162ea2a36 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c @@ -117,7 +117,7 @@ static struct afs_server *afs_alloc_server(struct afs_cell *cell, const uuid_t * _enter(""); - server = kzalloc_obj(struct afs_server, GFP_KERNEL); + server = kzalloc_obj(struct afs_server); if (!server) return NULL; diff --git a/fs/afs/super.c b/fs/afs/super.c index 2b567fe5b4cb..942f3e9800d7 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -502,7 +502,7 @@ static struct afs_super_info *afs_alloc_sbi(struct fs_context *fc) struct afs_fs_context *ctx = fc->fs_private; struct afs_super_info *as; - as = kzalloc_obj(struct afs_super_info, GFP_KERNEL); + as = kzalloc_obj(struct afs_super_info); if (as) { as->net_ns = get_net(fc->net_ns); as->flock_mode = ctx->flock_mode; @@ -623,7 +623,7 @@ static int afs_init_fs_context(struct fs_context *fc) struct afs_fs_context *ctx; struct afs_cell *cell; - ctx = kzalloc_obj(struct afs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct afs_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index 05abd50e4057..a40b43464cfa 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -122,7 +122,7 @@ struct afs_vldb_entry *afs_vl_get_entry_by_name_u(struct afs_vl_cursor *vc, padsz = (4 - (volnamesz & 3)) & 3; reqsz = 8 + volnamesz + padsz; - entry = kzalloc_obj(struct afs_vldb_entry, GFP_KERNEL); + entry = kzalloc_obj(struct afs_vldb_entry); if (!entry) return ERR_PTR(-ENOMEM); diff --git a/fs/afs/volume.c b/fs/afs/volume.c index 260df046143a..9ae5c8ad2e04 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -81,7 +81,7 @@ static struct afs_volume *afs_alloc_volume(struct afs_fs_context *params, struct afs_volume *volume; int ret = -ENOMEM, i; - volume = kzalloc_obj(struct afs_volume, GFP_KERNEL); + volume = kzalloc_obj(struct afs_volume); if (!volume) goto error_0; diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c index 2daf23af01e5..af9398d48e39 100644 --- a/fs/afs/xattr.c +++ b/fs/afs/xattr.c @@ -157,7 +157,7 @@ static int afs_xattr_get_yfs(const struct xattr_handler *handler, else return -EOPNOTSUPP; - yacl = kzalloc_obj(struct yfs_acl, GFP_KERNEL); + yacl = kzalloc_obj(struct yfs_acl); if (!yacl) goto error; diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 5134a042044c..c53dc551053b 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -13,7 +13,7 @@ struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi) { struct autofs_info *ino; - ino = kzalloc_obj(*ino, GFP_KERNEL); + ino = kzalloc_obj(*ino); if (ino) { INIT_LIST_HEAD(&ino->active); INIT_LIST_HEAD(&ino->expiring); @@ -242,7 +242,7 @@ static struct autofs_sb_info *autofs_alloc_sbi(void) { struct autofs_sb_info *sbi; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return NULL; @@ -405,7 +405,7 @@ int autofs_init_fs_context(struct fs_context *fc) struct autofs_fs_context *ctx; struct autofs_sb_info *sbi; - ctx = kzalloc_obj(struct autofs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct autofs_fs_context); if (!ctx) goto nomem; diff --git a/fs/autofs/waitq.c b/fs/autofs/waitq.c index 21ecd0bbc0ca..d46241342dfc 100644 --- a/fs/autofs/waitq.c +++ b/fs/autofs/waitq.c @@ -376,7 +376,7 @@ int autofs_wait(struct autofs_sb_info *sbi, if (!wq) { /* Create a new wait queue */ - wq = kmalloc_obj(struct autofs_wait_queue, GFP_KERNEL); + wq = kmalloc_obj(struct autofs_wait_queue); if (!wq) { kfree(name); mutex_unlock(&sbi->wq_mutex); diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index df54c52d2f19..cecbc92f959a 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -790,7 +790,7 @@ befs_fill_super(struct super_block *sb, struct fs_context *fc) struct befs_mount_options *parsed_opts = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; - sb->s_fs_info = kzalloc_obj(*befs_sb, GFP_KERNEL); + sb->s_fs_info = kzalloc_obj(*befs_sb); if (sb->s_fs_info == NULL) goto unacquire_none; @@ -956,7 +956,7 @@ static int befs_init_fs_context(struct fs_context *fc) { struct befs_mount_options *opts; - opts = kzalloc_obj(*opts, GFP_KERNEL); + opts = kzalloc_obj(*opts); if (!opts) return -ENOMEM; diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 6ed07d892e3d..9da02f5cb6cd 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -334,7 +334,7 @@ static int bfs_fill_super(struct super_block *s, struct fs_context *fc) unsigned long i_sblock, i_eblock, i_eoff, s_size; int silent = fc->sb_flags & SB_SILENT; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; mutex_init(&info->bfs_lock); diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 6ea9681cab33..49a196721cc7 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -916,7 +916,7 @@ static int load_elf_binary(struct linux_binprm *bprm) */ would_dump(bprm, interpreter); - interp_elf_ex = kmalloc_obj(*interp_elf_ex, GFP_KERNEL); + interp_elf_ex = kmalloc_obj(*interp_elf_ex); if (!interp_elf_ex) { retval = -ENOMEM; goto out_free_file; @@ -1798,7 +1798,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t, fill_note(&t->notes[0], PRSTATUS, sizeof(t->prstatus), &t->prstatus); info->size += notesize(&t->notes[0]); - fpu = kzalloc_obj(elf_fpregset_t, GFP_KERNEL); + fpu = kzalloc_obj(elf_fpregset_t); if (!fpu || !elf_core_copy_task_fpregs(p, fpu)) { kfree(fpu); return 1; @@ -1824,7 +1824,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, u16 machine; u32 flags; - psinfo = kmalloc_obj(*psinfo, GFP_KERNEL); + psinfo = kmalloc_obj(*psinfo); if (!psinfo) return 0; fill_note(&info->psinfo, PRPSINFO, sizeof(*psinfo), psinfo); @@ -2036,7 +2036,7 @@ static int elf_core_dump(struct coredump_params *cprm) /* For cell spufs and x86 xstate */ sz += elf_coredump_extra_notes_size(); - phdr4note = kmalloc_obj(*phdr4note, GFP_KERNEL); + phdr4note = kmalloc_obj(*phdr4note); if (!phdr4note) goto end_coredump; @@ -2051,7 +2051,7 @@ static int elf_core_dump(struct coredump_params *cprm) e_shoff = offset; if (e_phnum == PN_XNUM) { - shdr4extnum = kmalloc_obj(*shdr4extnum, GFP_KERNEL); + shdr4extnum = kmalloc_obj(*shdr4extnum); if (!shdr4extnum) goto end_coredump; fill_extnum_info(&elf, shdr4extnum, e_shoff, segs); diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index cee0871b0164..526e048e2956 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -1391,7 +1391,7 @@ static struct elf_thread_status *elf_dump_thread_status(long signr, struct task_ struct elf_thread_status *t; int i, ret; - t = kzalloc_obj(struct elf_thread_status, GFP_KERNEL); + t = kzalloc_obj(struct elf_thread_status); if (!t) return t; @@ -1486,10 +1486,10 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) struct elf_thread_status *tmp; /* alloc memory for large data structures: too large to be on stack */ - elf = kmalloc_obj(*elf, GFP_KERNEL); + elf = kmalloc_obj(*elf); if (!elf) goto end_coredump; - psinfo = kmalloc_obj(*psinfo, GFP_KERNEL); + psinfo = kmalloc_obj(*psinfo); if (!psinfo) goto end_coredump; @@ -1547,7 +1547,7 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) offset += segs * sizeof(struct elf_phdr); /* Program headers */ /* Write notes phdr entry */ - phdr4note = kmalloc_obj(*phdr4note, GFP_KERNEL); + phdr4note = kmalloc_obj(*phdr4note); if (!phdr4note) goto end_coredump; @@ -1562,7 +1562,7 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) e_shoff = offset; if (e_phnum == PN_XNUM) { - shdr4extnum = kmalloc_obj(*shdr4extnum, GFP_KERNEL); + shdr4extnum = kmalloc_obj(*shdr4extnum); if (!shdr4extnum) goto end_coredump; fill_extnum_info(elf, shdr4extnum, e_shoff, segs); diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 4a15e09bc398..b3d8fd70e8b1 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -961,7 +961,7 @@ static int bm_fill_super(struct super_block *sb, struct fs_context *fc) * create their own separate binfmt_misc mounts we should * consider turning this into a kmem cache. */ - misc = kzalloc_obj(struct binfmt_misc, GFP_KERNEL); + misc = kzalloc_obj(struct binfmt_misc); if (!misc) return -ENOMEM; diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index cce7b2610364..e6f33d09497f 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -85,7 +85,7 @@ struct btrfs_workqueue *btrfs_alloc_workqueue(struct btrfs_fs_info *fs_info, const char *name, unsigned int flags, int limit_active, int thresh) { - struct btrfs_workqueue *ret = kzalloc_obj(*ret, GFP_KERNEL); + struct btrfs_workqueue *ret = kzalloc_obj(*ret); if (!ret) return NULL; @@ -126,7 +126,7 @@ struct btrfs_workqueue *btrfs_alloc_ordered_workqueue( { struct btrfs_workqueue *ret; - ret = kzalloc_obj(*ret, GFP_KERNEL); + ret = kzalloc_obj(*ret); if (!ret) return NULL; diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 78bf0cad1d2d..af98421e7922 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1805,7 +1805,7 @@ struct btrfs_backref_share_check_ctx *btrfs_alloc_backref_share_check_ctx(void) { struct btrfs_backref_share_check_ctx *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return NULL; @@ -2797,7 +2797,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root, if (IS_ERR(fspath)) return ERR_CAST(fspath); - ifp = kmalloc_obj(*ifp, GFP_KERNEL); + ifp = kmalloc_obj(*ifp); if (!ifp) { kvfree(fspath); return ERR_PTR(-ENOMEM); diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 7fde7698c331..790518a8c803 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -662,7 +662,7 @@ static struct list_head *alloc_heuristic_ws(struct btrfs_fs_info *fs_info) { struct heuristic_ws *ws; - ws = kzalloc_obj(*ws, GFP_KERNEL); + ws = kzalloc_obj(*ws); if (!ws) return ERR_PTR(-ENOMEM); @@ -670,11 +670,11 @@ static struct list_head *alloc_heuristic_ws(struct btrfs_fs_info *fs_info) if (!ws->sample) goto fail; - ws->bucket = kzalloc_objs(*ws->bucket, BUCKET_SIZE, GFP_KERNEL); + ws->bucket = kzalloc_objs(*ws->bucket, BUCKET_SIZE); if (!ws->bucket) goto fail; - ws->bucket_b = kzalloc_objs(*ws->bucket_b, BUCKET_SIZE, GFP_KERNEL); + ws->bucket_b = kzalloc_objs(*ws->bucket_b, BUCKET_SIZE); if (!ws->bucket_b) goto fail; @@ -734,7 +734,7 @@ static int alloc_workspace_manager(struct btrfs_fs_info *fs_info, struct list_head *workspace; ASSERT(fs_info->compr_wsm[type] == NULL); - gwsm = kzalloc_obj(*gwsm, GFP_KERNEL); + gwsm = kzalloc_obj(*gwsm); if (!gwsm) return -ENOMEM; diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index a9b0b596429d..8d05f1a58b7c 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -200,7 +200,7 @@ static inline struct extent_changeset *extent_changeset_alloc(void) { struct extent_changeset *ret; - ret = kmalloc_obj(*ret, GFP_KERNEL); + ret = kmalloc_obj(*ret); if (!ret) return NULL; diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 21cb45e23a6f..a4cb9d3cfc4e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2842,7 +2842,7 @@ static int add_falloc_range(struct list_head *head, u64 start, u64 len) } } - range = kmalloc_obj(*range, GFP_KERNEL); + range = kmalloc_obj(*range); if (!range) return -ENOMEM; range->start = start; @@ -3572,7 +3572,7 @@ static loff_t find_desired_extent(struct file *file, loff_t offset, int whence) */ private = NULL; } else if (!private) { - private = kzalloc_obj(*private, GFP_KERNEL); + private = kzalloc_obj(*private); /* * No worries if memory allocation failed. * The private structure is used only for speeding up multiple diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index da4be08d133e..f3ecbca47edb 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3967,7 +3967,7 @@ static int btrfs_init_file_extent_tree(struct btrfs_inode *inode) if (btrfs_is_free_space_inode(inode)) return 0; - inode->file_extent_tree = kmalloc_obj(struct extent_io_tree, GFP_KERNEL); + inode->file_extent_tree = kmalloc_obj(struct extent_io_tree); if (!inode->file_extent_tree) return -ENOMEM; @@ -6221,7 +6221,7 @@ static int btrfs_opendir(struct inode *inode, struct file *file) if (ret) return ret; - private = kzalloc_obj(struct btrfs_file_private, GFP_KERNEL); + private = kzalloc_obj(struct btrfs_file_private); if (!private) return -ENOMEM; private->last_index = last_index; diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index af8a9c698b07..2bd0178c95a2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -726,7 +726,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, return -ETXTBSY; } - pending_snapshot = kzalloc_obj(*pending_snapshot, GFP_KERNEL); + pending_snapshot = kzalloc_obj(*pending_snapshot); if (!pending_snapshot) return -ENOMEM; @@ -1958,7 +1958,7 @@ static int btrfs_ioctl_get_subvol_info(struct inode *inode, void __user *argp) if (!path) return -ENOMEM; - subvol_info = kzalloc_obj(*subvol_info, GFP_KERNEL); + subvol_info = kzalloc_obj(*subvol_info); if (!subvol_info) { btrfs_free_path(path); return -ENOMEM; @@ -3423,7 +3423,7 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg) goto out_unlock; } - bctl = kzalloc_obj(*bctl, GFP_KERNEL); + bctl = kzalloc_obj(*bctl); if (!bctl) { ret = -ENOMEM; goto out_unlock; @@ -3604,7 +3604,7 @@ static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) } if (sa->assign) { - prealloc = kzalloc_obj(*prealloc, GFP_KERNEL); + prealloc = kzalloc_obj(*prealloc); if (!prealloc) { ret = -ENOMEM; goto out; @@ -3924,7 +3924,7 @@ static long btrfs_ioctl_set_received_subvol_32(struct file *file, if (IS_ERR(args32)) return PTR_ERR(args32); - args64 = kmalloc_obj(*args64, GFP_KERNEL); + args64 = kmalloc_obj(*args64); if (!args64) { ret = -ENOMEM; goto out; @@ -4234,7 +4234,7 @@ static int _btrfs_ioctl_send(struct btrfs_root *root, void __user *argp, bool co ret = copy_from_user(&args32, argp, sizeof(args32)); if (ret) return -EFAULT; - arg = kzalloc_obj(*arg, GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) return -ENOMEM; arg->send_fd = args32.send_fd; diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index e37d986f26be..049a940ba449 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c @@ -88,7 +88,7 @@ struct list_head *lzo_alloc_workspace(struct btrfs_fs_info *fs_info) { struct workspace *workspace; - workspace = kzalloc_obj(*workspace, GFP_KERNEL); + workspace = kzalloc_obj(*workspace); if (!workspace) return ERR_PTR(-ENOMEM); diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 6bd8739097d3..3cdd9755dc52 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -495,7 +495,7 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info) struct btrfs_qgroup *prealloc; struct btrfs_root *tree_root = fs_info->tree_root; - prealloc = kzalloc_obj(*prealloc, GFP_KERNEL); + prealloc = kzalloc_obj(*prealloc); if (!prealloc) { ret = -ENOMEM; goto out; @@ -585,7 +585,7 @@ next1: goto next2; } - list = kzalloc_obj(*list, GFP_KERNEL); + list = kzalloc_obj(*list); if (!list) { ret = -ENOMEM; goto out; diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index dfed8eaf938e..865dc30002cd 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -455,7 +455,7 @@ static noinline_for_stack struct scrub_ctx *scrub_setup_ctx( /* Since sctx has inline 128 stripes, it can go beyond 64K easily. Use * kvzalloc(). */ - sctx = kvzalloc_obj(*sctx, GFP_KERNEL); + sctx = kvzalloc_obj(*sctx); if (!sctx) goto nomem; refcount_set(&sctx->refs, 1); diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 23b0b06ac71c..7b2ea38b62dd 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -450,7 +450,7 @@ static struct fs_path *fs_path_alloc(void) { struct fs_path *p; - p = kmalloc_obj(*p, GFP_KERNEL); + p = kmalloc_obj(*p); if (!p) return NULL; init_path(p); @@ -2743,7 +2743,7 @@ static int cache_dir_utimes(struct send_ctx *sctx, u64 dir, u64 gen) return 0; /* Caching is optional, don't fail if we can't allocate memory. */ - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) return send_utimes(sctx, dir, gen); @@ -2870,7 +2870,7 @@ static void cache_dir_created(struct send_ctx *sctx, u64 dir) int ret; /* Caching is optional, ignore any failures. */ - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) return; @@ -2974,7 +2974,7 @@ static struct recorded_ref *recorded_ref_alloc(void) { struct recorded_ref *ref; - ref = kzalloc_obj(*ref, GFP_KERNEL); + ref = kzalloc_obj(*ref); if (!ref) return NULL; RB_CLEAR_NODE(&ref->node); @@ -3083,7 +3083,7 @@ static struct orphan_dir_info *add_orphan_dir_info(struct send_ctx *sctx, return entry; } - odi = kmalloc_obj(*odi, GFP_KERNEL); + odi = kmalloc_obj(*odi); if (!odi) return ERR_PTR(-ENOMEM); odi->ino = dir_ino; @@ -3284,7 +3284,7 @@ static int add_waiting_dir_move(struct send_ctx *sctx, u64 ino, bool orphanized) struct rb_node *parent = NULL; struct waiting_dir_move *entry, *dm; - dm = kmalloc_obj(*dm, GFP_KERNEL); + dm = kmalloc_obj(*dm); if (!dm) return -ENOMEM; dm->ino = ino; @@ -3352,7 +3352,7 @@ static int add_pending_dir_move(struct send_ctx *sctx, int exists = 0; int ret; - pm = kmalloc_obj(*pm, GFP_KERNEL); + pm = kmalloc_obj(*pm); if (!pm) return -ENOMEM; pm->parent_ino = parent_ino; @@ -8035,7 +8035,7 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen goto out; } - sctx = kzalloc_obj(struct send_ctx, GFP_KERNEL); + sctx = kzalloc_obj(struct send_ctx); if (!sctx) { ret = -ENOMEM; goto out; diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3f9523563259..b4d26ca9220a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2054,7 +2054,7 @@ static int btrfs_get_tree_subvol(struct fs_context *fc) * of the fs_info (locks and such) to make cleanup easier if we find a * superblock with our given fs_devices later on at sget() time. */ - fs_info = kvzalloc_obj(struct btrfs_fs_info, GFP_KERNEL); + fs_info = kvzalloc_obj(struct btrfs_fs_info); if (!fs_info) return -ENOMEM; @@ -2173,7 +2173,7 @@ static int btrfs_init_fs_context(struct fs_context *fc) { struct btrfs_fs_context *ctx; - ctx = kzalloc_obj(struct btrfs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct btrfs_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index f62278f0c191..0d14570c8bc2 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -2597,7 +2597,7 @@ int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info) if (fs_info->qgroups_kobj) return 0; - fs_info->qgroups_kobj = kzalloc_obj(struct kobject, GFP_KERNEL); + fs_info->qgroups_kobj = kzalloc_obj(struct kobject); if (!fs_info->qgroups_kobj) return -ENOMEM; diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index c5b1bc0f7f91..fa177070d2d0 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -98,7 +98,7 @@ struct btrfs_device *btrfs_alloc_dummy_device(struct btrfs_fs_info *fs_info) { struct btrfs_device *dev; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return ERR_PTR(-ENOMEM); @@ -122,14 +122,14 @@ struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(u32 nodesize, u32 sectorsize) if (!fs_info) return fs_info; - fs_info->fs_devices = kzalloc_obj(struct btrfs_fs_devices, GFP_KERNEL); + fs_info->fs_devices = kzalloc_obj(struct btrfs_fs_devices); if (!fs_info->fs_devices) { kfree(fs_info); return NULL; } INIT_LIST_HEAD(&fs_info->fs_devices->devices); - fs_info->super_copy = kzalloc_obj(struct btrfs_super_block, GFP_KERNEL); + fs_info->super_copy = kzalloc_obj(struct btrfs_super_block); if (!fs_info->super_copy) { kfree(fs_info->fs_devices); kfree(fs_info); @@ -206,10 +206,10 @@ btrfs_alloc_dummy_block_group(struct btrfs_fs_info *fs_info, { struct btrfs_block_group *cache; - cache = kzalloc_obj(*cache, GFP_KERNEL); + cache = kzalloc_obj(*cache); if (!cache) return NULL; - cache->free_space_ctl = kzalloc_obj(*cache->free_space_ctl, GFP_KERNEL); + cache->free_space_ctl = kzalloc_obj(*cache->free_space_ctl); if (!cache->free_space_ctl) { kfree(cache); return NULL; diff --git a/fs/btrfs/tests/delayed-refs-tests.c b/fs/btrfs/tests/delayed-refs-tests.c index fdc183ebc6da..ccab45d849bb 100644 --- a/fs/btrfs/tests/delayed-refs-tests.c +++ b/fs/btrfs/tests/delayed-refs-tests.c @@ -985,7 +985,7 @@ int btrfs_test_delayed_refs(u32 sectorsize, u32 nodesize) test_std_err(TEST_ALLOC_FS_INFO); return -ENOMEM; } - transaction = kmalloc_obj(*transaction, GFP_KERNEL); + transaction = kmalloc_obj(*transaction); if (!transaction) { test_std_err(TEST_ALLOC_TRANSACTION); ret = -ENOMEM; diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 71ff7006ca6b..6fb0c4cd50ff 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -382,7 +382,7 @@ static struct btrfs_fs_devices *alloc_fs_devices(const u8 *fsid) { struct btrfs_fs_devices *fs_devs; - fs_devs = kzalloc_obj(*fs_devs, GFP_KERNEL); + fs_devs = kzalloc_obj(*fs_devs); if (!fs_devs) return ERR_PTR(-ENOMEM); @@ -7202,7 +7202,7 @@ struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info, if (WARN_ON(!devid && !fs_info)) return ERR_PTR(-EINVAL); - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) return ERR_PTR(-ENOMEM); diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index 5a0913a31991..1b7544aa88a2 100644 --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c @@ -75,7 +75,7 @@ struct list_head *zlib_alloc_workspace(struct btrfs_fs_info *fs_info, unsigned i struct workspace *workspace; int workspacesize; - workspace = kzalloc_obj(*workspace, GFP_KERNEL); + workspace = kzalloc_obj(*workspace); if (!workspace) return ERR_PTR(-ENOMEM); diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index fcdfb831b484..a27db827d87b 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -377,7 +377,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache) if (device->zone_info) return 0; - zone_info = kzalloc_obj(*zone_info, GFP_KERNEL); + zone_info = kzalloc_obj(*zone_info); if (!zone_info) return -ENOMEM; diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c index a7a41dd320d9..6f076fa8f3f9 100644 --- a/fs/btrfs/zstd.c +++ b/fs/btrfs/zstd.c @@ -185,7 +185,7 @@ int zstd_alloc_workspace_manager(struct btrfs_fs_info *fs_info) struct list_head *ws; ASSERT(fs_info->compr_wsm[BTRFS_COMPRESS_ZSTD] == NULL); - zwsm = kzalloc_obj(*zwsm, GFP_KERNEL); + zwsm = kzalloc_obj(*zwsm); if (!zwsm) return -ENOMEM; zstd_calc_ws_mem_sizes(); @@ -373,7 +373,7 @@ struct list_head *zstd_alloc_workspace(struct btrfs_fs_info *fs_info, int level) const u32 blocksize = fs_info->sectorsize; struct workspace *workspace; - workspace = kzalloc_obj(*workspace, GFP_KERNEL); + workspace = kzalloc_obj(*workspace); if (!workspace) return ERR_PTR(-ENOMEM); diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 99795864bcb3..4117b145ac94 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c @@ -102,7 +102,7 @@ static int cachefiles_daemon_open(struct inode *inode, struct file *file) return -EBUSY; /* allocate a cache record */ - cache = kzalloc_obj(struct cachefiles_cache, GFP_KERNEL); + cache = kzalloc_obj(struct cachefiles_cache); if (!cache) { cachefiles_open = 0; return -ENOMEM; diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c index 7b9d547ecee6..eaf47851c65f 100644 --- a/fs/cachefiles/io.c +++ b/fs/cachefiles/io.c @@ -132,7 +132,7 @@ static int cachefiles_read(struct netfs_cache_resources *cres, } ret = -ENOMEM; - ki = kzalloc_obj(struct cachefiles_kiocb, GFP_KERNEL); + ki = kzalloc_obj(struct cachefiles_kiocb); if (!ki) goto presubmission_error; @@ -298,7 +298,7 @@ int __cachefiles_write(struct cachefiles_object *object, file, file_inode(file)->i_ino, start_pos, len, i_size_read(file_inode(file))); - ki = kzalloc_obj(struct cachefiles_kiocb, GFP_KERNEL); + ki = kzalloc_obj(struct cachefiles_kiocb); if (!ki) { if (term_func) term_func(term_func_priv, -ENOMEM); diff --git a/fs/cachefiles/volume.c b/fs/cachefiles/volume.c index 655de0cef530..6c0da61362ee 100644 --- a/fs/cachefiles/volume.c +++ b/fs/cachefiles/volume.c @@ -28,7 +28,7 @@ void cachefiles_acquire_volume(struct fscache_volume *vcookie) _enter(""); - volume = kzalloc_obj(struct cachefiles_volume, GFP_KERNEL); + volume = kzalloc_obj(struct cachefiles_volume); if (!volume) return; volume->vcookie = vcookie; diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 5d7c2ffae8fa..d51454e995a8 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2395,7 +2395,7 @@ static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode) mutex_lock(&mdsc->mutex); max_sessions = mdsc->max_sessions; - sessions = kzalloc_objs(s, max_sessions, GFP_KERNEL); + sessions = kzalloc_objs(s, max_sessions); if (!sessions) { mutex_unlock(&mdsc->mutex); err = -ENOMEM; diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c index 643c8ba28ae7..f3de43ccb470 100644 --- a/fs/ceph/crypto.c +++ b/fs/ceph/crypto.c @@ -50,7 +50,7 @@ static int ceph_crypt_set_context(struct inode *inode, const void *ctx, if (len > FSCRYPT_SET_CONTEXT_MAX_SIZE) return -EINVAL; - cfa = kzalloc_obj(*cfa, GFP_KERNEL); + cfa = kzalloc_obj(*cfa); if (!cfa) return -ENOMEM; @@ -112,7 +112,7 @@ int ceph_fscrypt_prepare_context(struct inode *dir, struct inode *inode, if (!encrypted) return 0; - as->fscrypt_auth = kzalloc_obj(*as->fscrypt_auth, GFP_KERNEL); + as->fscrypt_auth = kzalloc_obj(*as->fscrypt_auth); if (!as->fscrypt_auth) return -ENOMEM; diff --git a/fs/ceph/file.c b/fs/ceph/file.c index fdbf4aeaa408..66bbf6d517a9 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1572,7 +1572,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, */ if (pos == iocb->ki_pos && !is_sync_kiocb(iocb) && (len == count || pos + count <= i_size_read(inode))) { - aio_req = kzalloc_obj(*aio_req, GFP_KERNEL); + aio_req = kzalloc_obj(*aio_req); if (aio_req) { aio_req->iocb = iocb; aio_req->write = write; diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c index 514da29469b8..4dc9426643e8 100644 --- a/fs/ceph/quota.c +++ b/fs/ceph/quota.c @@ -103,7 +103,7 @@ find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino) } if (!qri || (qri->ino != ino)) { /* Not found, create a new one and insert it */ - qri = kmalloc_obj(*qri, GFP_KERNEL); + qri = kmalloc_obj(*qri); if (qri) { qri->ino = ino; qri->inode = NULL; diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 57320e830eda..2aed6b3359b6 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -809,7 +809,7 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt, struct ceph_fs_client *fsc; int err; - fsc = kzalloc_obj(*fsc, GFP_KERNEL); + fsc = kzalloc_obj(*fsc); if (!fsc) { err = -ENOMEM; goto fail; @@ -1429,7 +1429,7 @@ static int ceph_init_fs_context(struct fs_context *fc) struct ceph_parse_opts_ctx *pctx; struct ceph_mount_options *fsopt; - pctx = kzalloc_obj(*pctx, GFP_KERNEL); + pctx = kzalloc_obj(*pctx); if (!pctx) return -ENOMEM; @@ -1437,7 +1437,7 @@ static int ceph_init_fs_context(struct fs_context *fc) if (!pctx->copts) goto nomem; - pctx->opts = kzalloc_obj(*pctx->opts, GFP_KERNEL); + pctx->opts = kzalloc_obj(*pctx->opts); if (!pctx->opts) goto nomem; diff --git a/fs/char_dev.c b/fs/char_dev.c index 49b2641bbe03..00229e25c10f 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -115,7 +115,7 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor, return ERR_PTR(-EINVAL); } - cd = kzalloc_obj(struct char_device_struct, GFP_KERNEL); + cd = kzalloc_obj(struct char_device_struct); if (cd == NULL) return ERR_PTR(-ENOMEM); @@ -636,7 +636,7 @@ static struct kobj_type ktype_cdev_dynamic = { */ struct cdev *cdev_alloc(void) { - struct cdev *p = kzalloc_obj(struct cdev, GFP_KERNEL); + struct cdev *p = kzalloc_obj(struct cdev); if (p) { INIT_LIST_HEAD(&p->list); kobject_init(&p->kobj, &ktype_cdev_dynamic); diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 329cefb16fb5..c64b8cd81568 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -362,7 +362,7 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) cii = ITOC(file_inode(coda_file)); - vdir = kmalloc_obj(*vdir, GFP_KERNEL); + vdir = kmalloc_obj(*vdir); if (!vdir) return -ENOMEM; if (!dir_emit_dots(coda_file, ctx)) diff --git a/fs/coda/file.c b/fs/coda/file.c index a40ba8d0b14b..6ca8bfcb58f2 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c @@ -175,7 +175,7 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma) if (ret) return ret; - cvm_ops = kmalloc_obj(struct coda_vm_ops, GFP_KERNEL); + cvm_ops = kmalloc_obj(struct coda_vm_ops); if (!cvm_ops) return -ENOMEM; @@ -231,7 +231,7 @@ int coda_open(struct inode *coda_inode, struct file *coda_file) unsigned short coda_flags = coda_flags_to_cflags(flags); struct coda_file_info *cfi; - cfi = kmalloc_obj(struct coda_file_info, GFP_KERNEL); + cfi = kmalloc_obj(struct coda_file_info); if (!cfi) return -ENOMEM; diff --git a/fs/coda/inode.c b/fs/coda/inode.c index d95ae651f528..ad1654f3adf8 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -381,7 +381,7 @@ static int coda_init_fs_context(struct fs_context *fc) { struct coda_fs_context *ctx; - ctx = kzalloc_obj(struct coda_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct coda_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 0abde29b4f47..3438119b5dcf 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -724,7 +724,7 @@ static int coda_upcall(struct venus_comm *vcp, } /* Format the request message. */ - req = kmalloc_obj(struct upc_req, GFP_KERNEL); + req = kmalloc_obj(struct upc_req); if (!req) { error = -ENOMEM; goto exit; @@ -788,10 +788,10 @@ static int coda_upcall(struct venus_comm *vcp, } error = -ENOMEM; - sig_req = kmalloc_obj(struct upc_req, GFP_KERNEL); + sig_req = kmalloc_obj(struct upc_req); if (!sig_req) goto exit; - sig_inputArgs = kvzalloc_obj(*sig_inputArgs, GFP_KERNEL); + sig_inputArgs = kvzalloc_obj(*sig_inputArgs); if (!sig_inputArgs) { kfree(sig_req); goto exit; diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index f437b1ab3b68..362b6ff9b908 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -159,7 +159,7 @@ static struct configfs_fragment *new_fragment(void) { struct configfs_fragment *p; - p = kmalloc_obj(struct configfs_fragment, GFP_KERNEL); + p = kmalloc_obj(struct configfs_fragment); if (p) { atomic_set(&p->frag_count, 1); init_rwsem(&p->frag_sem); @@ -1847,7 +1847,7 @@ configfs_register_default_group(struct config_group *parent_group, int ret; struct config_group *group; - group = kzalloc_obj(*group, GFP_KERNEL); + group = kzalloc_obj(*group); if (!group) return ERR_PTR(-ENOMEM); config_group_init_type_name(group, name, item_type); diff --git a/fs/configfs/file.c b/fs/configfs/file.c index a83d1981e96f..ef8c3cd10cc6 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -296,7 +296,7 @@ static int __configfs_open_file(struct inode *inode, struct file *file, int type int error; error = -ENOMEM; - buffer = kzalloc_obj(struct configfs_buffer, GFP_KERNEL); + buffer = kzalloc_obj(struct configfs_buffer); if (!buffer) goto out; diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index e7d8500fee7d..bc507b720a01 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -47,7 +47,7 @@ int configfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, sd_iattr = sd->s_iattr; if (!sd_iattr) { /* setting attributes for the first time, allocate now */ - sd_iattr = kzalloc_obj(struct iattr, GFP_KERNEL); + sd_iattr = kzalloc_obj(struct iattr); if (!sd_iattr) return -ENOMEM; /* assign default attributes */ diff --git a/fs/coredump.c b/fs/coredump.c index c5b81cacbabb..55b700517e9f 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -262,7 +262,7 @@ static bool coredump_parse(struct core_name *cn, struct coredump_params *cprm, switch (cn->core_type) { case COREDUMP_PIPE: { int argvs = sizeof(core_pattern) / 2; - (*argv) = kmalloc_objs(**argv, argvs, GFP_KERNEL); + (*argv) = kmalloc_objs(**argv, argvs); if (!(*argv)) return false; (*argv)[(*argc)++] = 0; diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 10403cb81182..e0ba9cd640dc 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -619,7 +619,7 @@ static int cramfs_blkdev_fill_super(struct super_block *sb, struct fs_context *f struct cramfs_super super; int i, err; - sbi = kzalloc_obj(struct cramfs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct cramfs_sb_info); if (!sbi) return -ENOMEM; sb->s_fs_info = sbi; @@ -640,7 +640,7 @@ static int cramfs_mtd_fill_super(struct super_block *sb, struct fs_context *fc) struct cramfs_super super; int err; - sbi = kzalloc_obj(struct cramfs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct cramfs_sb_info); if (!sbi) return -ENOMEM; sb->s_fs_info = sbi; diff --git a/fs/crypto/inline_crypt.c b/fs/crypto/inline_crypt.c index e286d9fd17f3..c0852b920dbc 100644 --- a/fs/crypto/inline_crypt.c +++ b/fs/crypto/inline_crypt.c @@ -32,7 +32,7 @@ static struct block_device **fscrypt_get_devices(struct super_block *sb, if (devs) return devs; } - devs = kmalloc_obj(*devs, GFP_KERNEL); + devs = kmalloc_obj(*devs); if (!devs) return ERR_PTR(-ENOMEM); devs[0] = sb->s_bdev; @@ -169,7 +169,7 @@ int fscrypt_prepare_inline_crypt_key(struct fscrypt_prepared_key *prep_key, unsigned int i; int err; - blk_key = kmalloc_obj(*blk_key, GFP_KERNEL); + blk_key = kmalloc_obj(*blk_key); if (!blk_key) return -ENOMEM; diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c index 855314a28b18..9ec6e5ef0947 100644 --- a/fs/crypto/keyring.c +++ b/fs/crypto/keyring.c @@ -209,7 +209,7 @@ static int allocate_filesystem_keyring(struct super_block *sb) if (sb->s_master_keys) return 0; - keyring = kzalloc_obj(*keyring, GFP_KERNEL); + keyring = kzalloc_obj(*keyring); if (!keyring) return -ENOMEM; spin_lock_init(&keyring->lock); @@ -434,7 +434,7 @@ static int add_new_master_key(struct super_block *sb, struct fscrypt_master_key *mk; int err; - mk = kzalloc_obj(*mk, GFP_KERNEL); + mk = kzalloc_obj(*mk); if (!mk) return -ENOMEM; diff --git a/fs/crypto/keysetup_v1.c b/fs/crypto/keysetup_v1.c index 93fc2ab7ee97..3d673c36b678 100644 --- a/fs/crypto/keysetup_v1.c +++ b/fs/crypto/keysetup_v1.c @@ -221,7 +221,7 @@ fscrypt_get_direct_key(const struct fscrypt_inode_info *ci, const u8 *raw_key) return dk; /* Nope, allocate one. */ - dk = kzalloc_obj(*dk, GFP_KERNEL); + dk = kzalloc_obj(*dk); if (!dk) return ERR_PTR(-ENOMEM); dk->dk_sb = ci->ci_inode->i_sb; diff --git a/fs/crypto/policy.c b/fs/crypto/policy.c index 49309e9da4ea..9915e39362db 100644 --- a/fs/crypto/policy.c +++ b/fs/crypto/policy.c @@ -813,7 +813,7 @@ int fscrypt_parse_test_dummy_encryption(const struct fs_parameter *param, if (param->type == fs_value_is_string && *param->string) arg = param->string; - policy = kzalloc_obj(*policy, GFP_KERNEL); + policy = kzalloc_obj(*policy); if (!policy) return -ENOMEM; diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 70b8dcd3599d..3376ab6a519d 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -82,7 +82,7 @@ static int __debugfs_file_get(struct dentry *dentry, enum dbgfs_get_mode mode) if (WARN_ON(mode == DBGFS_GET_ALREADY)) return -EINVAL; - fsd = kmalloc_obj(*fsd, GFP_KERNEL); + fsd = kmalloc_obj(*fsd); if (!fsd) return -ENOMEM; diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index a9e161f6fb7d..4598142355b9 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -310,7 +310,7 @@ static int debugfs_init_fs_context(struct fs_context *fc) { struct debugfs_fs_info *fsi; - fsi = kzalloc_obj(struct debugfs_fs_info, GFP_KERNEL); + fsi = kzalloc_obj(struct debugfs_fs_info); if (!fsi) return -ENOMEM; diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 93af356408ee..9844dcf354ee 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -420,7 +420,7 @@ static int devpts_init_fs_context(struct fs_context *fc) { struct pts_fs_info *fsi; - fsi = kzalloc_obj(struct pts_fs_info, GFP_KERNEL); + fsi = kzalloc_obj(struct pts_fs_info); if (!fsi) return -ENOMEM; diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 0f80fda98227..53cd33293042 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -602,7 +602,7 @@ static void drop_node(struct config_group *g, struct config_item *i) struct dlm_node *nd = config_item_to_node(i); struct dlm_member_gone *mb_gone; - mb_gone = kzalloc_obj(*mb_gone, GFP_KERNEL); + mb_gone = kzalloc_obj(*mb_gone); if (!mb_gone) return; diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 3b6e6a29eab8..c381e1028446 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5050,7 +5050,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls) int wait_type, local_unlock_result, local_cancel_result; int dir_nodeid; - ms_local = kmalloc_obj(*ms_local, GFP_KERNEL); + ms_local = kmalloc_obj(*ms_local); if (!ms_local) return; diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 812d889f1ce5..f84233a0fe4a 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -511,7 +511,7 @@ void dlm_lsop_recover_done(struct dlm_ls *ls) return; num = ls->ls_num_nodes; - slots = kzalloc_objs(*slots, num, GFP_KERNEL); + slots = kzalloc_objs(*slots, num); if (!slots) return; diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 6ada136f3f3f..3b59346d68c5 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -1793,7 +1793,7 @@ int ecryptfs_encrypt_and_encode_filename( & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES)) { struct ecryptfs_filename *filename; - filename = kzalloc_obj(*filename, GFP_KERNEL); + filename = kzalloc_obj(*filename); if (!filename) { rc = -ENOMEM; goto out; diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 04b6d296a3fa..e8494903bb42 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c @@ -623,7 +623,7 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, struct key *auth_tok_key = NULL; int rc = 0; - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; @@ -860,7 +860,7 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, (*packet_size) = 0; (*filename_size) = 0; (*filename) = NULL; - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index dcfa607fbf15..f4ab387eb4ed 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -610,7 +610,7 @@ static int ecryptfs_init_fs_context(struct fs_context *fc) struct ecryptfs_fs_context *ctx; struct ecryptfs_sb_info *sbi = NULL; - ctx = kzalloc_obj(struct ecryptfs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct ecryptfs_fs_context); if (!ctx) return -ENOMEM; sbi = kmem_cache_zalloc(ecryptfs_sb_info_cache, GFP_KERNEL); diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index 6cf3052e9370..30c8e15d87b5 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -131,7 +131,7 @@ ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, struct file *file) { int rc = 0; - (*daemon) = kzalloc_obj(**daemon, GFP_KERNEL); + (*daemon) = kzalloc_obj(**daemon); if (!(*daemon)) { rc = -ENOMEM; goto out; diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 14c2752831c8..1c5224cf183e 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -44,7 +44,7 @@ static int efivarfs_ops_notifier(struct notifier_block *nb, unsigned long event, static struct inode *efivarfs_alloc_inode(struct super_block *sb) { - struct efivar_entry *entry = kzalloc_obj(*entry, GFP_KERNEL); + struct efivar_entry *entry = kzalloc_obj(*entry); if (!entry) return NULL; @@ -505,7 +505,7 @@ static int efivarfs_init_fs_context(struct fs_context *fc) if (!efivar_is_available()) return -EOPNOTSUPP; - sfi = kzalloc_obj(*sfi, GFP_KERNEL); + sfi = kzalloc_obj(*sfi); if (!sfi) return -ENOMEM; diff --git a/fs/efs/super.c b/fs/efs/super.c index 54252bccd6a3..11fea3bbce7c 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c @@ -243,7 +243,7 @@ static int efs_fill_super(struct super_block *s, struct fs_context *fc) struct buffer_head *bh; struct inode *root; - sb = kzalloc_obj(struct efs_sb_info, GFP_KERNEL); + sb = kzalloc_obj(struct efs_sb_info); if (!sb) return -ENOMEM; s->s_fs_info = sb; 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; diff --git a/fs/eventfd.c b/fs/eventfd.c index a0ea7f30c76f..9d33a02757d5 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -388,7 +388,7 @@ static int do_eventfd(unsigned int count, int flags) if (flags & ~EFD_FLAGS_SET) return -EINVAL; - ctx = kmalloc_obj(*ctx, GFP_KERNEL); + ctx = kmalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 4d0c0ce43cb3..a8c278c50083 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1147,7 +1147,7 @@ static int ep_alloc(struct eventpoll **pep) { struct eventpoll *ep; - ep = kzalloc_obj(*ep, GFP_KERNEL); + ep = kzalloc_obj(*ep); if (unlikely(!ep)) return -ENOMEM; diff --git a/fs/exec.c b/fs/exec.c index c367e74cf103..9ea3a775d51e 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1402,7 +1402,7 @@ static struct linux_binprm *alloc_bprm(int fd, struct filename *filename, int fl if (IS_ERR(file)) return ERR_CAST(file); - bprm = kzalloc_obj(*bprm, GFP_KERNEL); + bprm = kzalloc_obj(*bprm); if (!bprm) { do_close_execat(file); return ERR_PTR(-ENOMEM); diff --git a/fs/exfat/super.c b/fs/exfat/super.c index 42a232394afb..83396fd265cd 100644 --- a/fs/exfat/super.c +++ b/fs/exfat/super.c @@ -815,7 +815,7 @@ static int exfat_init_fs_context(struct fs_context *fc) { struct exfat_sb_info *sbi; - sbi = kzalloc_obj(struct exfat_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct exfat_sb_info); if (!sbi) return -ENOMEM; diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 2bac6dcb1792..007eee794bd1 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -419,7 +419,7 @@ void ext2_init_block_alloc_info(struct inode *inode) struct ext2_block_alloc_info *block_i; struct super_block *sb = inode->i_sb; - block_i = kmalloc_obj(*block_i, GFP_KERNEL); + block_i = kmalloc_obj(*block_i); if (block_i) { struct ext2_reserve_window_node *rsv = &block_i->rsv_window_node; diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 9bb4c63f5628..b20a6eb6822b 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -893,12 +893,12 @@ static int ext2_fill_super(struct super_block *sb, struct fs_context *fc) __le32 features; int err; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; sbi->s_blockgroup_lock = - kzalloc_obj(struct blockgroup_lock, GFP_KERNEL); + kzalloc_obj(struct blockgroup_lock); if (!sbi->s_blockgroup_lock) { kfree(sbi); return -ENOMEM; @@ -1669,7 +1669,7 @@ static int ext2_init_fs_context(struct fs_context *fc) { struct ext2_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 75179be4a488..3a31e3d718c9 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c @@ -217,7 +217,7 @@ int ext4_setup_system_zone(struct super_block *sb) ext4_group_t i; int ret; - system_blks = kzalloc_obj(*system_blks, GFP_KERNEL); + system_blks = kzalloc_obj(*system_blks); if (!system_blks) return -ENOMEM; diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index b285ce18b183..36dc53df0fb2 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -672,7 +672,7 @@ static int ext4_dir_open(struct inode *inode, struct file *file) { struct dir_private_info *info; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; file->private_data = info; diff --git a/fs/ext4/extents-test.c b/fs/ext4/extents-test.c index 913103089799..7c4690eb7dad 100644 --- a/fs/ext4/extents-test.c +++ b/fs/ext4/extents-test.c @@ -229,7 +229,7 @@ static int extents_kunit_init(struct kunit *test) sb->s_blocksize = 4096; sb->s_blocksize_bits = 12; - sbi = kzalloc_obj(struct ext4_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct ext4_sb_info); if (sbi == NULL) return -ENOMEM; @@ -240,7 +240,7 @@ static int extents_kunit_init(struct kunit *test) sbi->s_extent_max_zeroout_kb = 32; /* setup the mock inode */ - k_ctx.k_ei = kzalloc_obj(struct ext4_inode_info, GFP_KERNEL); + k_ctx.k_ei = kzalloc_obj(struct ext4_inode_info); if (k_ctx.k_ei == NULL) return -ENOMEM; ei = k_ctx.k_ei; diff --git a/fs/ext4/mballoc-test.c b/fs/ext4/mballoc-test.c index 6b448aad6f63..9fbdf6a09489 100644 --- a/fs/ext4/mballoc-test.c +++ b/fs/ext4/mballoc-test.c @@ -34,7 +34,7 @@ static struct inode *mbt_alloc_inode(struct super_block *sb) { struct ext4_inode_info *ei; - ei = kmalloc_obj(struct ext4_inode_info, GFP_KERNEL); + ei = kmalloc_obj(struct ext4_inode_info); if (!ei) return NULL; @@ -73,11 +73,11 @@ static int mbt_mb_init(struct super_block *sb) int ret; /* needed by ext4_mb_init->bdev_nonrot(sb->s_bdev) */ - sb->s_bdev = kzalloc_obj(*sb->s_bdev, GFP_KERNEL); + sb->s_bdev = kzalloc_obj(*sb->s_bdev); if (sb->s_bdev == NULL) return -ENOMEM; - sb->s_bdev->bd_queue = kzalloc_obj(struct request_queue, GFP_KERNEL); + sb->s_bdev->bd_queue = kzalloc_obj(struct request_queue); if (sb->s_bdev->bd_queue == NULL) { kfree(sb->s_bdev); return -ENOMEM; @@ -137,7 +137,7 @@ static struct super_block *mbt_ext4_alloc_super_block(void) struct super_block *sb; struct ext4_sb_info *sbi; - fsb = kzalloc_obj(*fsb, GFP_KERNEL); + fsb = kzalloc_obj(*fsb); if (fsb == NULL) return NULL; @@ -148,7 +148,7 @@ static struct super_block *mbt_ext4_alloc_super_block(void) sbi = &fsb->sbi; sbi->s_blockgroup_lock = - kzalloc_obj(struct blockgroup_lock, GFP_KERNEL); + kzalloc_obj(struct blockgroup_lock); if (!sbi->s_blockgroup_lock) goto out_deactivate; @@ -252,7 +252,7 @@ static int mbt_ctx_init(struct super_block *sb) struct mbt_ctx *ctx = MBT_CTX(sb); ext4_group_t i, ngroups = ext4_get_groups_count(sb); - ctx->grp_ctx = kzalloc_objs(struct mbt_grp_ctx, ngroups, GFP_KERNEL); + ctx->grp_ctx = kzalloc_objs(struct mbt_grp_ctx, ngroups); if (ctx->grp_ctx == NULL) return -ENOMEM; diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 4d0bf2fcf2d3..b6d59385e13d 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3754,7 +3754,7 @@ int ext4_mb_init(struct super_block *sb) } while (i < MB_NUM_ORDERS(sb)); sbi->s_mb_avg_fragment_size = - kmalloc_objs(struct xarray, MB_NUM_ORDERS(sb), GFP_KERNEL); + kmalloc_objs(struct xarray, MB_NUM_ORDERS(sb)); if (!sbi->s_mb_avg_fragment_size) { ret = -ENOMEM; goto out; @@ -3763,7 +3763,7 @@ int ext4_mb_init(struct super_block *sb) xa_init(&sbi->s_mb_avg_fragment_size[i]); sbi->s_mb_largest_free_orders = - kmalloc_objs(struct xarray, MB_NUM_ORDERS(sb), GFP_KERNEL); + kmalloc_objs(struct xarray, MB_NUM_ORDERS(sb)); if (!sbi->s_mb_largest_free_orders) { ret = -ENOMEM; goto out; diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 780679645b6e..2c5b851c552a 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -32,7 +32,7 @@ static void ext4_rcu_ptr_callback(struct rcu_head *head) void ext4_kvfree_array_rcu(void *to_free) { - struct ext4_rcu_ptr *ptr = kzalloc_obj(*ptr, GFP_KERNEL); + struct ext4_rcu_ptr *ptr = kzalloc_obj(*ptr); if (ptr) { ptr->ptr = to_free; diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 63784d9b1874..43f680c750ae 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2016,7 +2016,7 @@ int ext4_init_fs_context(struct fs_context *fc) { struct ext4_fs_context *ctx; - ctx = kzalloc_obj(struct ext4_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct ext4_fs_context); if (!ctx) return -ENOMEM; @@ -2496,11 +2496,11 @@ static int parse_apply_sb_mount_options(struct super_block *sb, if (strscpy_pad(s_mount_opts, sbi->s_es->s_mount_opts) < 0) return -E2BIG; - fc = kzalloc_obj(struct fs_context, GFP_KERNEL); + fc = kzalloc_obj(struct fs_context); if (!fc) return -ENOMEM; - s_ctx = kzalloc_obj(struct ext4_fs_context, GFP_KERNEL); + s_ctx = kzalloc_obj(struct ext4_fs_context); if (!s_ctx) goto out_free; @@ -3962,7 +3962,7 @@ static int ext4_li_info_new(void) { struct ext4_lazy_init *eli = NULL; - eli = kzalloc_obj(*eli, GFP_KERNEL); + eli = kzalloc_obj(*eli); if (!eli) return -ENOMEM; @@ -3981,7 +3981,7 @@ static struct ext4_li_request *ext4_li_request_new(struct super_block *sb, { struct ext4_li_request *elr; - elr = kzalloc_obj(*elr, GFP_KERNEL); + elr = kzalloc_obj(*elr); if (!elr) return NULL; @@ -4328,7 +4328,7 @@ static struct ext4_sb_info *ext4_alloc_sbi(struct super_block *sb) { struct ext4_sb_info *sbi; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return NULL; @@ -4336,7 +4336,7 @@ static struct ext4_sb_info *ext4_alloc_sbi(struct super_block *sb) NULL, NULL); sbi->s_blockgroup_lock = - kzalloc_obj(struct blockgroup_lock, GFP_KERNEL); + kzalloc_obj(struct blockgroup_lock); if (!sbi->s_blockgroup_lock) goto err_out; @@ -4879,7 +4879,7 @@ static int ext4_group_desc_init(struct super_block *sb, } } rcu_assign_pointer(sbi->s_group_desc, - kvmalloc_objs(struct buffer_head *, db_count, GFP_KERNEL)); + kvmalloc_objs(struct buffer_head *, db_count)); if (sbi->s_group_desc == NULL) { ext4_msg(sb, KERN_ERR, "not enough memory"); return -ENOMEM; diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c index cdf78da85861..b87d7bdab06a 100644 --- a/fs/ext4/sysfs.c +++ b/fs/ext4/sysfs.c @@ -655,7 +655,7 @@ int __init ext4_init_sysfs(void) if (!ext4_root) return -ENOMEM; - ext4_feat = kzalloc_obj(*ext4_feat, GFP_KERNEL); + ext4_feat = kzalloc_obj(*ext4_feat); if (!ext4_feat) { ret = -ENOMEM; goto root_err; diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 2a12fe8eb668..8774c60b4be4 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3725,7 +3725,7 @@ static struct block_device **f2fs_get_devices(struct super_block *sb, if (!f2fs_is_multi_device(sbi)) return NULL; - devs = kmalloc_objs(*devs, sbi->s_ndevs, GFP_KERNEL); + devs = kmalloc_objs(*devs, sbi->s_ndevs); if (!devs) return ERR_PTR(-ENOMEM); @@ -4501,7 +4501,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi, struct f2fs_super_block *super; int err = 0; - super = kzalloc_obj(struct f2fs_super_block, GFP_KERNEL); + super = kzalloc_obj(struct f2fs_super_block); if (!super) return -ENOMEM; @@ -4938,7 +4938,7 @@ try_onemore: recovery = 0; /* allocate memory for f2fs-specific super block info */ - sbi = kzalloc_obj(struct f2fs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct f2fs_sb_info); if (!sbi) return -ENOMEM; @@ -5509,7 +5509,7 @@ static int f2fs_init_fs_context(struct fs_context *fc) { struct f2fs_fs_context *ctx; - ctx = kzalloc_obj(struct f2fs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct f2fs_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 175e8e66c29f..3cc5fb01afa1 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1554,7 +1554,7 @@ int fat_fill_super(struct super_block *sb, struct fs_context *fc, * the filesystem, since we're only just about to mount * it and have no inodes etc active! */ - sbi = kzalloc_obj(struct msdos_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct msdos_sb_info); if (!sbi) return -ENOMEM; sb->s_fs_info = sbi; @@ -1905,7 +1905,7 @@ int fat_init_fs_context(struct fs_context *fc, bool is_vfat) { struct fat_mount_options *opts; - opts = kzalloc_obj(*opts, GFP_KERNEL); + opts = kzalloc_obj(*opts); if (!opts) return -ENOMEM; diff --git a/fs/fcntl.c b/fs/fcntl.c index c9c73305011e..beab8080badf 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -100,7 +100,7 @@ int file_f_owner_allocate(struct file *file) if (f_owner) return 0; - f_owner = kzalloc_obj(struct fown_struct, GFP_KERNEL); + f_owner = kzalloc_obj(struct fown_struct); if (!f_owner) return -ENOMEM; diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c index c1d90905b7b2..e6ab8bdf7a6c 100644 --- a/fs/freevxfs/vxfs_fshead.c +++ b/fs/freevxfs/vxfs_fshead.c @@ -58,7 +58,7 @@ vxfs_getfsh(struct inode *ip, int which) if (bp) { struct vxfs_fsh *fhp; - if (!(fhp = kmalloc_obj(*fhp, GFP_KERNEL))) + if (!(fhp = kmalloc_obj(*fhp))) goto out; memcpy(fhp, bp->b_data, sizeof(*fhp)); diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index 44b4958277ce..d7d847d75c3d 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c @@ -193,7 +193,7 @@ static int vxfs_fill_super(struct super_block *sbp, struct fs_context *fc) sbp->s_flags |= SB_RDONLY; - infp = kzalloc_obj(*infp, GFP_KERNEL); + infp = kzalloc_obj(*infp); if (!infp) { warnf(fc, "vxfs: unable to allocate incore superblock"); return -ENOMEM; diff --git a/fs/fsopen.c b/fs/fsopen.c index a23f003ae056..ae19e5136598 100644 --- a/fs/fsopen.c +++ b/fs/fsopen.c @@ -102,7 +102,7 @@ static int fscontext_create_fd(struct fs_context *fc, unsigned int o_flags) static int fscontext_alloc_log(struct fs_context *fc) { - fc->log.log = kzalloc_obj(*fc->log.log, GFP_KERNEL); + fc->log.log = kzalloc_obj(*fc->log.log); if (!fc->log.log) return -ENOMEM; refcount_set(&fc->log.log->usage, 1); diff --git a/fs/fuse/backing.c b/fs/fuse/backing.c index 45a78ee15e3c..d95dfa48483f 100644 --- a/fs/fuse/backing.c +++ b/fs/fuse/backing.c @@ -112,7 +112,7 @@ int fuse_backing_open(struct fuse_conn *fc, struct fuse_backing_map *map) if (backing_sb->s_stack_depth >= fc->max_stack_depth) goto out_fput; - fb = kmalloc_obj(struct fuse_backing, GFP_KERNEL); + fb = kmalloc_obj(struct fuse_backing); res = -ENOMEM; if (!fb) goto out_fput; diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index 0aace951541b..dfcb98a654d8 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -362,7 +362,7 @@ static void cuse_process_init_reply(struct fuse_mount *fm, /* devt determined, create device */ rc = -ENOMEM; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto err_region; @@ -443,7 +443,7 @@ static int cuse_send_init(struct cuse_conn *cc) if (!folio) goto err; - ia = kzalloc_obj(*ia, GFP_KERNEL); + ia = kzalloc_obj(*ia); if (!ia) goto err_free_folio; @@ -505,7 +505,7 @@ static int cuse_channel_open(struct inode *inode, struct file *file) int rc; /* set up cuse_conn */ - cc = kzalloc_obj(*cc, GFP_KERNEL); + cc = kzalloc_obj(*cc); if (!cc) return -ENOMEM; diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 7d11eac4f629..f6cf00a8938c 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -1219,7 +1219,7 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd) __func__, nr_pages, nr_ranges); for (i = 0; i < nr_ranges; i++) { - range = kzalloc_obj(struct fuse_dax_mapping, GFP_KERNEL); + range = kzalloc_obj(struct fuse_dax_mapping); ret = -ENOMEM; if (!range) goto out_err; @@ -1255,7 +1255,7 @@ int fuse_dax_conn_alloc(struct fuse_conn *fc, enum fuse_dax_mode dax_mode, if (!dax_dev) return 0; - fcd = kzalloc_obj(*fcd, GFP_KERNEL); + fcd = kzalloc_obj(*fcd); if (!fcd) return -ENOMEM; diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 3ec0fa236da0..0b0241f47170 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1598,7 +1598,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, if (IS_ERR(fud)) return PTR_ERR(fud); - bufs = kvmalloc_objs(struct pipe_buffer, pipe->max_usage, GFP_KERNEL); + bufs = kvmalloc_objs(struct pipe_buffer, pipe->max_usage); if (!bufs) return -ENOMEM; @@ -2310,7 +2310,7 @@ static ssize_t fuse_dev_splice_write(struct pipe_inode_info *pipe, tail = pipe->tail; count = pipe_occupancy(head, tail); - bufs = kvmalloc_objs(struct pipe_buffer, count, GFP_KERNEL); + bufs = kvmalloc_objs(struct pipe_buffer, count); if (!bufs) { pipe_unlock(pipe); return -ENOMEM; diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c index 68067eaedda9..3a38b61aac26 100644 --- a/fs/fuse/dev_uring.c +++ b/fs/fuse/dev_uring.c @@ -277,7 +277,7 @@ static struct fuse_ring_queue *fuse_uring_create_queue(struct fuse_ring *ring, queue = kzalloc_obj(*queue, GFP_KERNEL_ACCOUNT); if (!queue) return NULL; - pq = kzalloc_objs(struct list_head, FUSE_PQ_HASH_SIZE, GFP_KERNEL); + pq = kzalloc_objs(struct list_head, FUSE_PQ_HASH_SIZE); if (!pq) { kfree(queue); return NULL; diff --git a/fs/fuse/file.c b/fs/fuse/file.c index e29aecdab97e..b1bb7153cb78 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -684,7 +684,7 @@ static struct fuse_io_args *fuse_io_alloc(struct fuse_io_priv *io, { struct fuse_io_args *ia; - ia = kzalloc_obj(*ia, GFP_KERNEL); + ia = kzalloc_obj(*ia); if (ia) { ia->io = io; ia->ap.folios = fuse_folios_alloc(nfolios, GFP_KERNEL, @@ -2834,7 +2834,7 @@ fuse_direct_IO(struct kiocb *iocb, struct iov_iter *iter) if ((iov_iter_rw(iter) == READ) && (offset >= i_size)) return 0; - io = kmalloc_obj(struct fuse_io_priv, GFP_KERNEL); + io = kmalloc_obj(struct fuse_io_priv); if (!io) return -ENOMEM; spin_lock_init(&io->lock); diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 3db0fe0d764b..e57b8af06be9 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1618,11 +1618,11 @@ struct fuse_dev *fuse_dev_alloc(void) struct fuse_dev *fud; struct list_head *pq; - fud = kzalloc_obj(struct fuse_dev, GFP_KERNEL); + fud = kzalloc_obj(struct fuse_dev); if (!fud) return NULL; - pq = kzalloc_objs(struct list_head, FUSE_PQ_HASH_SIZE, GFP_KERNEL); + pq = kzalloc_objs(struct list_head, FUSE_PQ_HASH_SIZE); if (!pq) { kfree(fud); return NULL; @@ -1780,7 +1780,7 @@ static int fuse_get_tree_submount(struct fs_context *fsc) struct super_block *sb; int err; - fm = kzalloc_obj(struct fuse_mount, GFP_KERNEL); + fm = kzalloc_obj(struct fuse_mount); if (!fm) return -ENOMEM; @@ -1981,11 +1981,11 @@ static int fuse_get_tree(struct fs_context *fsc) struct super_block *sb; int err; - fc = kmalloc_obj(*fc, GFP_KERNEL); + fc = kmalloc_obj(*fc); if (!fc) return -ENOMEM; - fm = kzalloc_obj(*fm, GFP_KERNEL); + fm = kzalloc_obj(*fm); if (!fm) { kfree(fc); return -ENOMEM; @@ -2047,7 +2047,7 @@ static int fuse_init_fs_context(struct fs_context *fsc) { struct fuse_fs_context *ctx; - ctx = kzalloc_obj(struct fuse_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct fuse_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index dc96ee0b952a..057e65b51b99 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -947,14 +947,14 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev, fs->num_request_queues = min_t(unsigned int, fs->num_request_queues, nr_cpu_ids); fs->nvqs = VQ_REQUEST + fs->num_request_queues; - fs->vqs = kzalloc_objs(fs->vqs[VQ_HIPRIO], fs->nvqs, GFP_KERNEL); + fs->vqs = kzalloc_objs(fs->vqs[VQ_HIPRIO], fs->nvqs); if (!fs->vqs) return -ENOMEM; - vqs = kmalloc_objs(vqs[VQ_HIPRIO], fs->nvqs, GFP_KERNEL); + vqs = kmalloc_objs(vqs[VQ_HIPRIO], fs->nvqs); fs->mq_map = kcalloc_node(nr_cpu_ids, sizeof(*fs->mq_map), GFP_KERNEL, dev_to_node(&vdev->dev)); - vqs_info = kzalloc_objs(*vqs_info, fs->nvqs, GFP_KERNEL); + vqs_info = kzalloc_objs(*vqs_info, fs->nvqs); if (!vqs || !vqs_info || !fs->mq_map) { ret = -ENOMEM; goto out; @@ -1120,7 +1120,7 @@ static int virtio_fs_probe(struct virtio_device *vdev) struct virtio_fs *fs; int ret; - fs = kzalloc_obj(*fs, GFP_KERNEL); + fs = kzalloc_obj(*fs); if (!fs) return -ENOMEM; kobject_init(&fs->kobj, &virtio_fs_ktype); @@ -1684,11 +1684,11 @@ static int virtio_fs_get_tree(struct fs_context *fsc) goto out_err; err = -ENOMEM; - fc = kzalloc_obj(struct fuse_conn, GFP_KERNEL); + fc = kzalloc_obj(struct fuse_conn); if (!fc) goto out_err; - fm = kzalloc_obj(struct fuse_mount, GFP_KERNEL); + fm = kzalloc_obj(struct fuse_mount); if (!fm) goto out_err; @@ -1743,7 +1743,7 @@ static int virtio_fs_init_fs_context(struct fs_context *fsc) if (fsc->purpose == FS_CONTEXT_FOR_SUBMOUNT) return fuse_init_fs_context_submount(fsc); - ctx = kzalloc_obj(struct fuse_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct fuse_fs_context); if (!ctx) return -ENOMEM; fsc->fs_private = ctx; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index f3f649fc5cb1..9b9e70f14d25 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -76,7 +76,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) { struct gfs2_sbd *sdp; - sdp = kzalloc_obj(struct gfs2_sbd, GFP_KERNEL); + sdp = kzalloc_obj(struct gfs2_sbd); if (!sdp) return NULL; @@ -562,7 +562,7 @@ static int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) break; error = -ENOMEM; - jd = kzalloc_obj(struct gfs2_jdesc, GFP_KERNEL); + jd = kzalloc_obj(struct gfs2_jdesc); if (!jd) break; @@ -1637,7 +1637,7 @@ static int gfs2_init_fs_context(struct fs_context *fc) { struct gfs2_args *args; - args = kmalloc_obj(*args, GFP_KERNEL); + args = kmalloc_obj(*args); if (args == NULL) return -ENOMEM; diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index af3dfeed62fe..5290865f27f1 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1318,7 +1318,7 @@ int gfs2_quota_sync(struct super_block *sb, int type) if (sb_rdonly(sdp->sd_vfs)) return 0; - qda = kzalloc_objs(struct gfs2_quota_data *, max_qd, GFP_KERNEL); + qda = kzalloc_objs(struct gfs2_quota_data *, max_qd); if (!qda) return -ENOMEM; diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 9a655588c0c5..bc191b55b18e 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -336,7 +336,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp) */ list_for_each_entry(jd, &sdp->sd_jindex_list, jd_list) { - lfcc = kmalloc_obj(struct lfcc, GFP_KERNEL); + lfcc = kmalloc_obj(struct lfcc); if (!lfcc) { error = -ENOMEM; goto out; @@ -860,7 +860,7 @@ static int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change_host int error = 0, err; memset(sc, 0, sizeof(struct gfs2_statfs_change_host)); - gha = kmalloc_objs(struct gfs2_holder, slots, GFP_KERNEL); + gha = kmalloc_objs(struct gfs2_holder, slots); if (!gha) return -ENOMEM; for (x = 0; x < slots; x++) diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index b5ee0e072935..2eb37a2f64e8 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c @@ -28,7 +28,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke sector_t start_block; loff_t offset; - tree = kzalloc_obj(*tree, GFP_KERNEL); + tree = kzalloc_obj(*tree); if (!tree) return NULL; diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c index 80277979c09c..f5e7efe924e7 100644 --- a/fs/hfs/dir.c +++ b/fs/hfs/dir.c @@ -148,7 +148,7 @@ static int hfs_readdir(struct file *file, struct dir_context *ctx) } rd = file->private_data; if (!rd) { - rd = kmalloc_obj(struct hfs_readdir_data, GFP_KERNEL); + rd = kmalloc_obj(struct hfs_readdir_data); if (!rd) { err = -ENOMEM; goto out; diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 78dc9dabb0c1..a4f2a2bfa6d3 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -411,7 +411,7 @@ static int hfs_init_fs_context(struct fs_context *fc) { struct hfs_sb_info *hsb; - hsb = kzalloc_obj(struct hfs_sb_info, GFP_KERNEL); + hsb = kzalloc_obj(struct hfs_sb_info); if (!hsb) return -ENOMEM; diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 5016d97290c8..1220a2f22737 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -139,7 +139,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) struct page *page; unsigned int size; - tree = kzalloc_obj(*tree, GFP_KERNEL); + tree = kzalloc_obj(*tree); if (!tree) return NULL; diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index 9998b28aa8f7..d559bf8625f8 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c @@ -263,7 +263,7 @@ next: } rd = file->private_data; if (!rd) { - rd = kmalloc_obj(struct hfsplus_readdir_data, GFP_KERNEL); + rd = kmalloc_obj(struct hfsplus_readdir_data); if (!rd) { err = -ENOMEM; goto out; diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index f60f37caea65..7229a8ae89f9 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -698,7 +698,7 @@ static int hfsplus_init_fs_context(struct fs_context *fc) { struct hfsplus_sb_info *sbi; - sbi = kzalloc_obj(struct hfsplus_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct hfsplus_sb_info); if (!sbi) return -ENOMEM; diff --git a/fs/hfsplus/unicode_test.c b/fs/hfsplus/unicode_test.c index c162c0fea4a8..26145bf88946 100644 --- a/fs/hfsplus/unicode_test.c +++ b/fs/hfsplus/unicode_test.c @@ -22,7 +22,7 @@ static struct test_mock_string_env *setup_mock_str_env(u32 buf_size) { struct test_mock_string_env *env; - env = kzalloc_obj(struct test_mock_string_env, GFP_KERNEL); + env = kzalloc_obj(struct test_mock_string_env); if (!env) return NULL; @@ -393,7 +393,7 @@ static struct test_mock_sb *setup_mock_sb(void) { struct test_mock_sb *ptr; - ptr = kzalloc_obj(struct test_mock_sb, GFP_KERNEL); + ptr = kzalloc_obj(struct test_mock_sb); if (!ptr) return NULL; diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 2c463a8c0ab4..abe86d72d9ef 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -1047,7 +1047,7 @@ static int hostfs_init_fs_context(struct fs_context *fc) { struct hostfs_fs_info *fsi; - fsi = kzalloc_obj(*fsi, GFP_KERNEL); + fsi = kzalloc_obj(*fsi); if (!fsi) return -ENOMEM; diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 0f17b7710ae5..c16d5d4caead 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -513,7 +513,7 @@ static int hpfs_fill_super(struct super_block *s, struct fs_context *fc) struct hpfs_dirent *de = NULL; struct quad_buffer_head qbh; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) { return -ENOMEM; } @@ -715,7 +715,7 @@ static int hpfs_init_fs_context(struct fs_context *fc) { struct hpfs_fc_context *ctx; - ctx = kzalloc_obj(struct hpfs_fc_context, GFP_KERNEL); + ctx = kzalloc_obj(struct hpfs_fc_context); if (!ctx) return -ENOMEM; diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 8e2c1fbdfd86..3f70c47981de 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -1407,7 +1407,7 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc) struct hugetlbfs_fs_context *ctx = fc->fs_private; struct hugetlbfs_sb_info *sbinfo; - sbinfo = kmalloc_obj(struct hugetlbfs_sb_info, GFP_KERNEL); + sbinfo = kmalloc_obj(struct hugetlbfs_sb_info); if (!sbinfo) return -ENOMEM; sb->s_fs_info = sbinfo; @@ -1478,7 +1478,7 @@ static int hugetlbfs_init_fs_context(struct fs_context *fc) { struct hugetlbfs_fs_context *ctx; - ctx = kzalloc_obj(struct hugetlbfs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct hugetlbfs_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index 438c00e526c6..95254aa1b654 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -677,7 +677,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, if (!iomi.len) return NULL; - dio = kmalloc_obj(*dio, GFP_KERNEL); + dio = kmalloc_obj(*dio); if (!dio) return ERR_PTR(-ENOMEM); diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index 4aa8f0734456..a17f0f590151 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c @@ -75,7 +75,7 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, /* Because zlib is not thread-safe, do all the I/O at the top. */ blocknum = block_start >> bufshift; - bhs = kzalloc_objs(*bhs, needblocks + 1, GFP_KERNEL); + bhs = kzalloc_objs(*bhs, needblocks + 1); if (!bhs) { *errp = -ENOMEM; return 0; diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 6597d0224835..5c01536c5e8f 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -589,7 +589,7 @@ static int isofs_fill_super(struct super_block *s, struct fs_context *fc) unsigned int vol_desc_start; int silent = fc->sb_flags & SB_SILENT; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; s->s_fs_info = sbi; @@ -1557,7 +1557,7 @@ static int isofs_init_fs_context(struct fs_context *fc) { struct isofs_options *opt; - opt = kzalloc_obj(*opt, GFP_KERNEL); + opt = kzalloc_obj(*opt); if (!opt) return -ENOMEM; diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 05ea1e5af80d..0fbd9a47ae67 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1175,7 +1175,7 @@ static int jbd2_seq_info_open(struct inode *inode, struct file *file) struct jbd2_stats_proc_session *s; int rc, size; - s = kmalloc_obj(*s, GFP_KERNEL); + s = kmalloc_obj(*s); if (s == NULL) return -ENOMEM; size = sizeof(struct transaction_stats_s); @@ -1525,7 +1525,7 @@ static journal_t *journal_init_common(struct block_device *bdev, int err; int n; - journal = kzalloc_obj(*journal, GFP_KERNEL); + journal = kzalloc_obj(*journal); if (!journal) return ERR_PTR(-ENOMEM); @@ -1578,7 +1578,7 @@ static journal_t *journal_init_common(struct block_device *bdev, n = journal->j_blocksize / jbd2_min_tag_size(); journal->j_wbufsize = n; journal->j_fc_wbuf = NULL; - journal->j_wbuf = kmalloc_objs(struct buffer_head *, n, GFP_KERNEL); + journal->j_wbuf = kmalloc_objs(struct buffer_head *, n); if (!journal->j_wbuf) goto err_cleanup; diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index 3aa9f82a8ef7..9016ddb82447 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c @@ -231,7 +231,7 @@ struct jbd2_revoke_table_s *jbd2_journal_init_revoke_table(int hash_size) table->hash_size = hash_size; table->hash_shift = shift; table->hash_table = - kvmalloc_objs(struct list_head, hash_size, GFP_KERNEL); + kvmalloc_objs(struct list_head, hash_size); if (!table->hash_table) { kmem_cache_free(jbd2_revoke_table_cache, table); table = NULL; 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); diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 368fcdd8c328..2abe8cc02ee6 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -161,7 +161,7 @@ int dbMount(struct inode *ipbmap) * allocate/initialize the in-memory bmap descriptor */ /* allocate memory for the in-memory bmap descriptor */ - bmp = kmalloc_obj(struct bmap, GFP_KERNEL); + bmp = kmalloc_obj(struct bmap); if (bmp == NULL) return -ENOMEM; diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 739fcb4a6fc8..294a67327c73 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -102,7 +102,7 @@ int diMount(struct inode *ipimap) * allocate/initialize the in-memory inode map control structure */ /* allocate the in-memory inode map control structure. */ - imap = kzalloc_obj(struct inomap, GFP_KERNEL); + imap = kzalloc_obj(struct inomap); if (imap == NULL) return -ENOMEM; diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 204cca8dd5d4..ada00d5bc214 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c @@ -1087,7 +1087,7 @@ int lmLogOpen(struct super_block *sb) } } - if (!(log = kzalloc_obj(struct jfs_log, GFP_KERNEL))) { + if (!(log = kzalloc_obj(struct jfs_log))) { mutex_unlock(&jfs_log_mutex); return -ENOMEM; } @@ -1156,7 +1156,7 @@ static int open_inline_log(struct super_block *sb) struct jfs_log *log; int rc; - if (!(log = kzalloc_obj(struct jfs_log, GFP_KERNEL))) + if (!(log = kzalloc_obj(struct jfs_log))) return -ENOMEM; INIT_LIST_HEAD(&log->sb_list); init_waitqueue_head(&log->syncwait); @@ -1190,7 +1190,7 @@ static int open_dummy_log(struct super_block *sb) mutex_lock(&jfs_log_mutex); if (!dummy_log) { - dummy_log = kzalloc_obj(struct jfs_log, GFP_KERNEL); + dummy_log = kzalloc_obj(struct jfs_log); if (!dummy_log) { mutex_unlock(&jfs_log_mutex); return -ENOMEM; @@ -1818,7 +1818,7 @@ static int lbmLogInit(struct jfs_log * log) goto error; buffer = page_address(page); for (offset = 0; offset < PAGE_SIZE; offset += LOGPSIZE) { - lbuf = kmalloc_obj(struct lbuf, GFP_KERNEL); + lbuf = kmalloc_obj(struct lbuf); if (lbuf == NULL) { if (offset == 0) __free_page(page); diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 4c1510091fe2..61575f7397ae 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -449,7 +449,7 @@ static int jfs_fill_super(struct super_block *sb, struct fs_context *fc) jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags); - sbi = kzalloc_obj(struct jfs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct jfs_sb_info); if (!sbi) return -ENOMEM; @@ -912,7 +912,7 @@ static int jfs_init_fs_context(struct fs_context *fc) { struct jfs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 3d0704e21f71..8d40c4b1db9f 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -989,7 +989,7 @@ struct kernfs_root *kernfs_create_root(struct kernfs_syscall_ops *scops, struct kernfs_root *root; struct kernfs_node *kn; - root = kzalloc_obj(*root, GFP_KERNEL); + root = kzalloc_obj(*root); if (!root) return ERR_PTR(-ENOMEM); diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index d338875f0258..e32406d62c0d 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -540,7 +540,7 @@ static int kernfs_get_open_node(struct kernfs_node *kn, if (!on) { /* not there, initialize a new one */ - on = kzalloc_obj(*on, GFP_KERNEL); + on = kzalloc_obj(*on); if (!on) { mutex_unlock(mutex); return -ENOMEM; @@ -638,7 +638,7 @@ static int kernfs_fop_open(struct inode *inode, struct file *file) /* allocate a kernfs_open_file for the file */ error = -ENOMEM; - of = kzalloc_obj(struct kernfs_open_file, GFP_KERNEL); + of = kzalloc_obj(struct kernfs_open_file); if (!of) goto err_out; diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index dd38e2e21a17..048f00b73b71 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -370,7 +370,7 @@ int kernfs_get_tree(struct fs_context *fc) struct kernfs_super_info *info; int error; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; @@ -451,7 +451,7 @@ static void __init kernfs_mutex_init(void) static void __init kernfs_lock_init(void) { - kernfs_locks = kmalloc_obj(struct kernfs_global_locks, GFP_KERNEL); + kernfs_locks = kmalloc_obj(struct kernfs_global_locks); WARN_ON(!kernfs_locks); kernfs_mutex_init(); diff --git a/fs/libfs.c b/fs/libfs.c index 361d5203e464..74134ba2e8d1 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -731,7 +731,7 @@ struct pseudo_fs_context *init_pseudo(struct fs_context *fc, { struct pseudo_fs_context *ctx; - ctx = kzalloc_obj(struct pseudo_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct pseudo_fs_context); if (likely(ctx)) { ctx->magic = magic; fc->fs_private = ctx; @@ -1320,7 +1320,7 @@ int simple_attr_open(struct inode *inode, struct file *file, { struct simple_attr *attr; - attr = kzalloc_obj(*attr, GFP_KERNEL); + attr = kzalloc_obj(*attr); if (!attr) return -ENOMEM; diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 372fe0cf830f..85bc0f3e91df 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -233,7 +233,7 @@ reclaimer(void *ptr) u32 nsmstate; struct net *net = host->net; - req = kmalloc_obj(*req, GFP_KERNEL); + req = kmalloc_obj(*req); if (!req) return 0; diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index e189b3ddfedf..fb4d0752c9bb 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -105,7 +105,7 @@ static struct nlm_lockowner *nlmclnt_find_lockowner(struct nlm_host *host, fl_ow res = __nlmclnt_find_lockowner(host, owner); if (res == NULL) { spin_unlock(&host->h_lock); - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); spin_lock(&host->h_lock); res = __nlmclnt_find_lockowner(host, owner); if (res == NULL && new != NULL) { @@ -208,7 +208,7 @@ struct nlm_rqst *nlm_alloc_call(struct nlm_host *host) struct nlm_rqst *call; for(;;) { - call = kzalloc_obj(*call, GFP_KERNEL); + call = kzalloc_obj(*call); if (call != NULL) { refcount_set(&call->a_count, 1); locks_init_lock(&call->a_args.lock.fl); diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 12a745a543e0..1a9582a10a86 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -126,7 +126,7 @@ static struct nlm_host *nlm_alloc_host(struct nlm_lookup_host_info *ni, } } - host = kmalloc_obj(*host, GFP_KERNEL); + host = kmalloc_obj(*host); if (unlikely(host == NULL)) { dprintk("lockd: %s failed; no memory\n", __func__); nsm_release(nsm); diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 1dee1da9ee0f..255a847ca0b6 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -233,7 +233,7 @@ nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host, return NULL; /* Allocate memory for block, and initialize arguments */ - block = kzalloc_obj(*block, GFP_KERNEL); + block = kzalloc_obj(*block); if (block == NULL) goto failed; kref_init(&block->b_count); @@ -380,7 +380,7 @@ static struct nlm_lockowner *nlmsvc_find_lockowner(struct nlm_host *host, pid_t if (res == NULL) { spin_unlock(&host->h_lock); - new = kmalloc_obj(*res, GFP_KERNEL); + new = kmalloc_obj(*res); spin_lock(&host->h_lock); res = __nlmsvc_find_lockowner(host, pid); if (res == NULL && new != NULL) { diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index fcfeaf6d6855..dd0214dcb695 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -128,7 +128,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, nlm_debug_print_fh("creating file for", &lock->fh); nfserr = nlm_lck_denied_nolocks; - file = kzalloc_obj(*file, GFP_KERNEL); + file = kzalloc_obj(*file); if (!file) goto out_free; diff --git a/fs/mbcache.c b/fs/mbcache.c index 19cb8eb6744e..d6707fbdeb50 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -358,7 +358,7 @@ struct mb_cache *mb_cache_create(int bucket_bits) unsigned long bucket_count = 1UL << bucket_bits; unsigned long i; - cache = kzalloc_obj(struct mb_cache, GFP_KERNEL); + cache = kzalloc_obj(struct mb_cache); if (!cache) goto err_out; cache->c_bucket_bits = bucket_bits; diff --git a/fs/minix/inode.c b/fs/minix/inode.c index 495d31b8cd0e..99541c6a5bbf 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -226,7 +226,7 @@ static int minix_fill_super(struct super_block *s, struct fs_context *fc) int ret = -EINVAL; int silent = fc->sb_flags & SB_SILENT; - sbi = kzalloc_obj(struct minix_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct minix_sb_info); if (!sbi) return -ENOMEM; s->s_fs_info = sbi; diff --git a/fs/namespace.c b/fs/namespace.c index 1cb7fa1a02ed..ebe19ded293a 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -889,7 +889,7 @@ mountpoint: } if (!mp) - mp = kmalloc_obj(struct mountpoint, GFP_KERNEL); + mp = kmalloc_obj(struct mountpoint); if (!mp) return -ENOMEM; @@ -2226,7 +2226,7 @@ static inline bool extend_array(struct path **res, struct path **to_free, if (likely(n < *count)) return true; - p = kmalloc_objs(struct path, new_count, GFP_KERNEL); + p = kmalloc_objs(struct path, new_count); if (p && *count) memcpy(p, *res, *count * sizeof(struct path)); *count = new_count; diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c index 60073d41a387..88a0d801525f 100644 --- a/fs/netfs/buffered_read.c +++ b/fs/netfs/buffered_read.c @@ -429,7 +429,7 @@ static int netfs_read_gaps(struct file *file, struct folio *folio) * end get copied to, but the middle is discarded. */ ret = -ENOMEM; - bvec = kmalloc_objs(*bvec, nr_bvec, GFP_KERNEL); + bvec = kmalloc_objs(*bvec, nr_bvec); if (!bvec) goto discard; diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c index 8fe514447df6..22a4d61631c9 100644 --- a/fs/netfs/buffered_write.c +++ b/fs/netfs/buffered_write.c @@ -302,7 +302,7 @@ ssize_t netfs_perform_write(struct kiocb *iocb, struct iov_iter *iter, goto copied; } - finfo = kzalloc_obj(*finfo, GFP_KERNEL); + finfo = kzalloc_obj(*finfo); if (!finfo) { iov_iter_revert(iter, copied); ret = -ENOMEM; diff --git a/fs/netfs/fscache_cache.c b/fs/netfs/fscache_cache.c index e709617b64d5..15b54d133633 100644 --- a/fs/netfs/fscache_cache.c +++ b/fs/netfs/fscache_cache.c @@ -25,7 +25,7 @@ static struct fscache_cache *fscache_alloc_cache(const char *name) { struct fscache_cache *cache; - cache = kzalloc_obj(*cache, GFP_KERNEL); + cache = kzalloc_obj(*cache); if (cache) { if (name) { cache->name = kstrdup(name, GFP_KERNEL); diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c index 90fa1e4440be..9738a1ae92ca 100644 --- a/fs/nfs/cache_lib.c +++ b/fs/nfs/cache_lib.c @@ -96,7 +96,7 @@ struct nfs_cache_defer_req *nfs_cache_defer_req_alloc(void) { struct nfs_cache_defer_req *dreq; - dreq = kzalloc_obj(*dreq, GFP_KERNEL); + dreq = kzalloc_obj(*dreq); if (dreq) { init_completion(&dreq->completion); refcount_set(&dreq->count, 1); diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 1c94a97efd31..4ea9221ded42 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -718,7 +718,7 @@ __be32 nfs4_callback_offload(void *data, void *dummy, struct nfs4_copy_state *copy, *tmp_copy; bool found = false; - copy = kzalloc_obj(struct nfs4_copy_state, GFP_KERNEL); + copy = kzalloc_obj(struct nfs4_copy_state); if (!copy) return cpu_to_be32(NFS4ERR_DELAY); diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 857393803e71..7f317ffa17c2 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -272,7 +272,7 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp, if (n == 0) goto out; - args->devs = kmalloc_objs(*args->devs, n, GFP_KERNEL); + args->devs = kmalloc_objs(*args->devs, n); if (!args->devs) { status = htonl(NFS4ERR_DELAY); goto out; diff --git a/fs/nfs/client.c b/fs/nfs/client.c index be6e3b61735d..be02bb227741 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -150,7 +150,7 @@ struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init) struct nfs_client *clp; int err = -ENOMEM; - if ((clp = kzalloc_obj(*clp, GFP_KERNEL)) == NULL) + if ((clp = kzalloc_obj(*clp)) == NULL) goto error_0; clp->cl_minorversion = cl_init->minorversion; @@ -1044,7 +1044,7 @@ struct nfs_server *nfs_alloc_server(void) { struct nfs_server *server; - server = kzalloc_obj(struct nfs_server, GFP_KERNEL); + server = kzalloc_obj(struct nfs_server); if (!server) return NULL; diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 624ee989929d..2402f57c8e7d 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -912,7 +912,7 @@ static struct page **nfs_readdir_alloc_pages(size_t npages) struct page **pages; size_t i; - pages = kmalloc_objs(*pages, npages, GFP_KERNEL); + pages = kmalloc_objs(*pages, npages); if (!pages) return NULL; for (i = 0; i < npages; i++) { @@ -942,7 +942,7 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc, unsigned int pglen; int status = -ENOMEM; - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) return -ENOMEM; entry->cookie = nfs_readdir_folio_last_cookie(folio); @@ -1154,7 +1154,7 @@ static int uncached_readdir(struct nfs_readdir_descriptor *desc) dfprintk(DIRCACHE, "NFS: uncached_readdir() searching for cookie %llu\n", (unsigned long long)desc->dir_cookie); - arrays = kzalloc_objs(*arrays, sz, GFP_KERNEL); + arrays = kzalloc_objs(*arrays, sz); if (!arrays) goto out; arrays[0] = nfs_readdir_folio_array_alloc(desc->dir_cookie, GFP_KERNEL); @@ -1245,7 +1245,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx) nfs_revalidate_mapping(inode, file->f_mapping); res = -ENOMEM; - desc = kzalloc_obj(*desc, GFP_KERNEL); + desc = kzalloc_obj(*desc); if (!desc) goto out; desc->file = file; @@ -3216,7 +3216,7 @@ found: void nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *set, const struct cred *cred) { - struct nfs_access_entry *cache = kmalloc_obj(*cache, GFP_KERNEL); + struct nfs_access_entry *cache = kmalloc_obj(*cache); if (cache == NULL) return; RB_CLEAR_NODE(&cache->rb_node); diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 9bce45de1cb4..2ed2126201f4 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -120,7 +120,7 @@ static void nfs_dns_ent_put(struct kref *ref) static struct cache_head *nfs_dns_ent_alloc(void) { - struct nfs_dns_ent *item = kmalloc_obj(*item, GFP_KERNEL); + struct nfs_dns_ent *item = kmalloc_obj(*item); if (item != NULL) { item->hostname = NULL; diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c index 2fc851abd187..c105882edd16 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -1692,7 +1692,7 @@ static int nfs_init_fs_context(struct fs_context *fc) { struct nfs_fs_context *ctx; - ctx = kzalloc_obj(struct nfs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct nfs_fs_context); if (unlikely(!ctx)) return -ENOMEM; diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index ea215fc2ed21..4786343eeee0 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1777,7 +1777,7 @@ struct nfs_fattr *nfs_alloc_fattr(void) { struct nfs_fattr *fattr; - fattr = kmalloc_obj(*fattr, GFP_KERNEL); + fattr = kmalloc_obj(*fattr); if (fattr != NULL) { nfs_fattr_init(fattr); fattr->label = NULL; @@ -1807,7 +1807,7 @@ struct nfs_fh *nfs_alloc_fhandle(void) { struct nfs_fh *fh; - fh = kmalloc_obj(struct nfs_fh, GFP_KERNEL); + fh = kmalloc_obj(struct nfs_fh); if (fh != NULL) fh->size = 0; return fh; diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index eb9cac652550..3e2de45c95fe 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -299,7 +299,7 @@ static struct nfs3_createdata *nfs3_alloc_createdata(void) { struct nfs3_createdata *data; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (data != NULL) { data->msg.rpc_argp = &data->arg; data->msg.rpc_resp = &data->res; diff --git a/fs/nfs/nfs40proc.c b/fs/nfs/nfs40proc.c index 53f54081942e..b07f2d6ccde4 100644 --- a/fs/nfs/nfs40proc.c +++ b/fs/nfs/nfs40proc.c @@ -320,7 +320,7 @@ nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp) if (clp->cl_mvops->minor_version != 0) return; - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return; data->lsp = lsp; diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 46298606e509..7b3ca68fb4bb 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -247,7 +247,7 @@ static int handle_async_copy(struct nfs42_copy_res *res, int status = NFS4_OK; u64 copied; - copy = kzalloc_obj(struct nfs4_copy_state, GFP_KERNEL); + copy = kzalloc_obj(struct nfs4_copy_state); if (!copy) return -ENOMEM; @@ -351,7 +351,7 @@ static int process_copy_commit(struct file *dst, loff_t pos_dst, struct nfs_commitres cres; int status = -ENOMEM; - cres.verf = kzalloc_obj(struct nfs_writeverf, GFP_KERNEL); + cres.verf = kzalloc_obj(struct nfs_writeverf); if (!cres.verf) goto out; @@ -461,7 +461,7 @@ static ssize_t _nfs42_proc_copy(struct file *src, res->commit_res.verf = NULL; if (args->sync) { res->commit_res.verf = - kzalloc_obj(struct nfs_writeverf, GFP_KERNEL); + kzalloc_obj(struct nfs_writeverf); if (!res->commit_res.verf) return -ENOMEM; } @@ -659,7 +659,7 @@ static int nfs42_do_offload_cancel_async(struct file *dst, if (!(dst_server->caps & NFS_CAP_OFFLOAD_CANCEL)) return -EOPNOTSUPP; - data = kzalloc_obj(struct nfs42_offload_data, GFP_KERNEL); + data = kzalloc_obj(struct nfs42_offload_data); if (data == NULL) return -ENOMEM; @@ -756,7 +756,7 @@ nfs42_proc_offload_status(struct file *dst, nfs4_stateid *stateid, u64 *copied) if (!(server->caps & NFS_CAP_OFFLOAD_STATUS)) return -EOPNOTSUPP; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; data->seq_server = server; @@ -838,7 +838,7 @@ int nfs42_proc_copy_notify(struct file *src, struct file *dst, if (!(src_server->caps & NFS_CAP_COPY_NOTIFY)) return -EOPNOTSUPP; - args = kzalloc_obj(struct nfs42_copy_notify_args, GFP_KERNEL); + args = kzalloc_obj(struct nfs42_copy_notify_args); if (args == NULL) return -ENOMEM; @@ -1535,7 +1535,7 @@ static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf, xdrlen = server->lxasize; np = xdrlen / PAGE_SIZE + 1; - pages = kzalloc_objs(struct page *, np, GFP_KERNEL); + pages = kzalloc_objs(struct page *, np); if (!pages) goto out_free_scratch; for (i = 0; i < np; i++) { @@ -1578,7 +1578,7 @@ ssize_t nfs42_proc_getxattr(struct inode *inode, const char *name, struct page **pages; np = nfs_page_array_len(0, buflen ?: XATTR_SIZE_MAX); - pages = kmalloc_objs(*pages, np, GFP_KERNEL); + pages = kmalloc_objs(*pages, np); if (!pages) return -ENOMEM; diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c index 432cfeebeba4..5c7452ce6e8a 100644 --- a/fs/nfs/nfs42xdr.c +++ b/fs/nfs/nfs42xdr.c @@ -1159,7 +1159,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res) if (segments == 0) return 0; - segs = kmalloc_objs(*segs, segments, GFP_KERNEL); + segs = kmalloc_objs(*segs, segments); if (!segs) return -ENOMEM; diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index bd079b4a6523..be40e126c539 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -164,7 +164,7 @@ retry: */ if (sync) return -EOPNOTSUPP; - cn_resp = kzalloc_obj(struct nfs42_copy_notify_res, GFP_KERNEL); + cn_resp = kzalloc_obj(struct nfs42_copy_notify_res); if (unlikely(cn_resp == NULL)) return -ENOMEM; diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c index 01fb53132279..bc397110d977 100644 --- a/fs/nfs/nfs4idmap.c +++ b/fs/nfs/nfs4idmap.c @@ -445,7 +445,7 @@ nfs_idmap_new(struct nfs_client *clp) struct rpc_pipe *pipe; int error; - idmap = kzalloc_obj(*idmap, GFP_KERNEL); + idmap = kzalloc_obj(*idmap); if (idmap == NULL) return -ENOMEM; @@ -579,7 +579,7 @@ static int nfs_idmap_legacy_upcall(struct key *authkey, void *aux) /* msg and im are freed in idmap_pipe_destroy_msg */ ret = -ENOMEM; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) goto out1; diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 7366f2e6bc12..14f72baf3b30 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c @@ -415,7 +415,7 @@ static int nfs_do_refmount(struct fs_context *fc, struct rpc_clnt *client) if (!page) return -ENOMEM; - fs_locations = kmalloc_obj(struct nfs4_fs_locations, GFP_KERNEL); + fs_locations = kmalloc_obj(struct nfs4_fs_locations); if (!fs_locations) goto out_free; fs_locations->fattr = nfs_alloc_fattr(); @@ -490,7 +490,7 @@ static int nfs4_try_replacing_one_location(struct nfs_server *server, size_t salen; int error; - sap = kmalloc_obj(*sap, GFP_KERNEL); + sap = kmalloc_obj(*sap); if (sap == NULL) return -ENOMEM; diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index df9ae871726d..91bcf67bd743 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4107,7 +4107,7 @@ static int _nfs4_discover_trunking(struct nfs_server *server, page = alloc_page(GFP_KERNEL); if (!page) goto out_put_cred; - locations = kmalloc_obj(struct nfs4_fs_locations, GFP_KERNEL); + locations = kmalloc_obj(struct nfs4_fs_locations); if (!locations) goto out_free; locations->fattr = nfs_alloc_fattr(); @@ -4341,7 +4341,7 @@ static int nfs4_get_referral(struct rpc_clnt *client, struct inode *dir, page = alloc_page(GFP_KERNEL); if (page == NULL) goto out; - locations = kmalloc_obj(struct nfs4_fs_locations, GFP_KERNEL); + locations = kmalloc_obj(struct nfs4_fs_locations); if (locations == NULL) goto out; @@ -5130,7 +5130,7 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, { struct nfs4_createdata *data; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (data != NULL) { struct nfs_server *server = NFS_SERVER(dir); @@ -6023,7 +6023,7 @@ static void nfs4_write_cached_acl(struct inode *inode, struct page **pages, acl->cached = 1; _copy_from_pages(acl->data, pages, pgbase, acl_len); } else { - acl = kmalloc_obj(*acl, GFP_KERNEL); + acl = kmalloc_obj(*acl); if (acl == NULL) goto out; acl->cached = 0; @@ -6070,7 +6070,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, buflen = server->rsize; npages = DIV_ROUND_UP(buflen, PAGE_SIZE) + 1; - pages = kmalloc_objs(struct page *, npages, GFP_KERNEL); + pages = kmalloc_objs(struct page *, npages); if (!pages) return -ENOMEM; @@ -6822,7 +6822,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred, if (nfs_server_capable(inode, NFS_CAP_MOVEABLE)) task_setup_data.flags |= RPC_TASK_MOVEABLE; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (data == NULL) return -ENOMEM; @@ -7026,7 +7026,7 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl, struct inode *inode = state->inode; struct nfs_lock_context *l_ctx; - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (p == NULL) return NULL; l_ctx = nfs_get_lock_context(ctx); @@ -9396,7 +9396,7 @@ static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, goto out_err; ret = ERR_PTR(-ENOMEM); - calldata = kzalloc_obj(*calldata, GFP_KERNEL); + calldata = kzalloc_obj(*calldata); if (calldata == NULL) goto out_put_clp; nfs4_init_sequence(clp, &calldata->args, &calldata->res, 0, is_privileged); @@ -10358,7 +10358,7 @@ static int nfs41_free_stateid(struct nfs_server *server, &task_setup.rpc_client, &msg); dprintk("NFS call free_stateid %p\n", stateid); - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (!data) return -ENOMEM; data->server = server; diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 7e1f14fad898..305a772e5497 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2054,7 +2054,7 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred clp->cl_hostname); page = alloc_page(GFP_KERNEL); - locations = kmalloc_obj(struct nfs4_fs_locations, GFP_KERNEL); + locations = kmalloc_obj(struct nfs4_fs_locations); fattr = nfs_alloc_fattr(); if (page == NULL || locations == NULL || fattr == NULL) { dprintk("<-- %s: no memory\n", __func__); diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 678f1f6c62bc..9c5895b551a1 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -100,7 +100,7 @@ static int nfs_referral_loop_protect(void) struct nfs_referral_count *p, *new; int ret = -ENOMEM; - new = kmalloc_obj(*new, GFP_KERNEL); + new = kmalloc_obj(*new); if (!new) goto out; new->task = current; diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 523f44a2a416..8c3d2efa2636 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -217,7 +217,7 @@ static struct nfs_createdata *nfs_alloc_createdata(struct inode *dir, { struct nfs_createdata *data; - data = kmalloc_obj(*data, GFP_KERNEL); + data = kmalloc_obj(*data); if (data != NULL) { data->arg.fh = NFS_FH(dir); diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c index 2c723d41b7a7..7d8921f524a6 100644 --- a/fs/nfs/sysfs.c +++ b/fs/nfs/sysfs.c @@ -43,7 +43,7 @@ int nfs_sysfs_init(void) { int ret; - nfs_kset = kzalloc_obj(*nfs_kset, GFP_KERNEL); + nfs_kset = kzalloc_obj(*nfs_kset); if (!nfs_kset) return -ENOMEM; @@ -172,7 +172,7 @@ static struct nfs_netns_client *nfs_netns_client_alloc(struct kobject *parent, { struct nfs_netns_client *p; - p = kzalloc_obj(*p, GFP_KERNEL); + p = kzalloc_obj(*p); if (p) { p->net = net; p->kobject.kset = nfs_kset; diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 2a07899c69af..df3ca4669df6 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -175,7 +175,7 @@ nfs_async_unlink(struct dentry *dentry, const struct qstr *name) int status = -ENOMEM; void *devname_garbage = NULL; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (data == NULL) goto out; data->args.name.name = kstrdup(name->name, GFP_KERNEL); @@ -355,7 +355,7 @@ nfs_async_rename(struct inode *old_dir, struct inode *new_dir, nfs_server_capable(new_dir, NFS_CAP_MOVEABLE)) task_setup_data.flags |= RPC_TASK_MOVEABLE; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (data == NULL) return ERR_PTR(-ENOMEM); task_setup_data.task = &data->task; diff --git a/fs/nfsd/blocklayoutxdr.c b/fs/nfsd/blocklayoutxdr.c index 3c145146a0c8..f80dbc41fd5f 100644 --- a/fs/nfsd/blocklayoutxdr.c +++ b/fs/nfsd/blocklayoutxdr.c @@ -164,7 +164,7 @@ nfsd4_block_decode_layoutupdate(struct xdr_stream *xdr, struct iomap **iomapp, if (len != expected) return nfserr_bad_xdr; - iomaps = kzalloc_objs(*iomaps, nr_iomaps, GFP_KERNEL); + iomaps = kzalloc_objs(*iomaps, nr_iomaps); if (!iomaps) return nfserr_delay; @@ -258,7 +258,7 @@ nfsd4_scsi_decode_layoutupdate(struct xdr_stream *xdr, struct iomap **iomapp, if (len != expected) return nfserr_bad_xdr; - iomaps = kzalloc_objs(*iomaps, nr_iomaps, GFP_KERNEL); + iomaps = kzalloc_objs(*iomaps, nr_iomaps); if (!iomaps) return nfserr_delay; diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 8fb394afc3f5..e8441fae01bf 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -234,7 +234,7 @@ static inline void expkey_update(struct cache_head *cnew, static struct cache_head *expkey_alloc(void) { - struct svc_expkey *i = kmalloc_obj(*i, GFP_KERNEL); + struct svc_expkey *i = kmalloc_obj(*i); if (i) return &i->h; else @@ -870,11 +870,11 @@ static void export_update(struct cache_head *cnew, struct cache_head *citem) static struct cache_head *svc_export_alloc(void) { - struct svc_export *i = kmalloc_obj(*i, GFP_KERNEL); + struct svc_export *i = kmalloc_obj(*i); if (!i) return NULL; - i->ex_stats = kmalloc_obj(*(i->ex_stats), GFP_KERNEL); + i->ex_stats = kmalloc_obj(*(i->ex_stats)); if (!i->ex_stats) { kfree(i); return NULL; diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 6b4eeb28c88b..1e2b38ed1d35 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -899,7 +899,7 @@ nfsd_alloc_fcache_disposal(void) { struct nfsd_fcache_disposal *l; - l = kmalloc_obj(*l, GFP_KERNEL); + l = kmalloc_obj(*l); if (!l) return NULL; spin_lock_init(&l->lock); diff --git a/fs/nfsd/flexfilelayout.c b/fs/nfsd/flexfilelayout.c index a65d55bcdc02..6d531285ab43 100644 --- a/fs/nfsd/flexfilelayout.c +++ b/fs/nfsd/flexfilelayout.c @@ -36,7 +36,7 @@ nfsd4_ff_proc_layoutget(struct svc_rqst *rqstp, struct inode *inode, * Zero it out for the stateid - don't want junk in there! */ error = -ENOMEM; - fl = kzalloc_obj(*fl, GFP_KERNEL); + fl = kzalloc_obj(*fl); if (!fl) goto out_error; args->lg_content = fl; @@ -86,7 +86,7 @@ nfsd4_ff_proc_getdeviceinfo(struct super_block *sb, struct svc_rqst *rqstp, u16 port; char addr[INET6_ADDRSTRLEN]; - da = kzalloc_obj(struct pnfs_ff_device_addr, GFP_KERNEL); + da = kzalloc_obj(struct pnfs_ff_device_addr); if (!da) return nfserrno(-ENOMEM); diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 88782df7c3a1..aea8bdd2fdc4 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1378,7 +1378,7 @@ void nfsd41_cb_referring_call(struct nfsd4_callback *cb, } } if (!found) { - rcl = kmalloc_obj(*rcl, GFP_KERNEL); + rcl = kmalloc_obj(*rcl); if (!rcl) return; memcpy(rcl->rcl_sessionid.data, sessionid->data, @@ -1397,7 +1397,7 @@ void nfsd41_cb_referring_call(struct nfsd4_callback *cb, } } if (!found) { - rc = kmalloc_obj(*rc, GFP_KERNEL); + rc = kmalloc_obj(*rc); if (!rc) goto out; rc->rc_sequenceid = seqno; diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 6415b847a939..ba06d3d3e6dd 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -97,7 +97,7 @@ ent_put(struct kref *ref) static struct cache_head * ent_alloc(void) { - struct ent *e = kmalloc_obj(*e, GFP_KERNEL); + struct ent *e = kmalloc_obj(*e); if (e) return &e->h; else diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 7dbb1dc184db..1d7b50c2cc3d 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -451,7 +451,7 @@ do_open_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stru int accmode; __be32 status; - *resfh = kmalloc_obj(struct svc_fh, GFP_KERNEL); + *resfh = kmalloc_obj(struct svc_fh); if (!*resfh) return nfserr_jukebox; fh_init(*resfh, NFS4_FHSIZE); @@ -1630,7 +1630,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, __be32 status = 0; *nsui = NULL; - work = kzalloc_obj(*work, GFP_KERNEL); + work = kzalloc_obj(*work); try_again: spin_lock(&nn->nfsd_ssc_lock); list_for_each_entry_safe(ni, tmp, &nn->nfsd_ssc_mount_list, nsui_list) { @@ -2160,7 +2160,7 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, memcpy(©->fh, &cstate->current_fh.fh_handle, sizeof(struct knfsd_fh)); if (nfsd4_copy_is_async(copy)) { - async_copy = kzalloc_obj(struct nfsd4_copy, GFP_KERNEL); + async_copy = kzalloc_obj(struct nfsd4_copy); if (!async_copy) goto out_err; async_copy->cp_nn = nn; diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 87de08c7f405..f72bffca6e0e 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -203,7 +203,7 @@ nfsd4_build_namelist(struct dir_context *__ctx, const char *name, int namlen, if (namlen != HEXDIR_LEN - 1) return true; - entry = kmalloc_obj(struct name_list, GFP_KERNEL); + entry = kmalloc_obj(struct name_list); if (entry == NULL) return false; memcpy(entry->name, name, HEXDIR_LEN - 1); @@ -897,7 +897,7 @@ __nfsd4_init_cld_pipe(struct net *net) if (nn->cld_net) return 0; - cn = kzalloc_obj(*cn, GFP_KERNEL); + cn = kzalloc_obj(*cn); if (!cn) { ret = -ENOMEM; goto err; @@ -959,7 +959,7 @@ alloc_cld_upcall(struct nfsd_net *nn) struct cld_upcall *new, *tmp; struct cld_net *cn = nn->cld_net; - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) return new; diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index fb5b2ff4201e..90dc841c2157 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -299,7 +299,7 @@ find_or_allocate_block(struct nfs4_lockowner *lo, struct knfsd_fh *fh, nbl = find_blocked_lock(lo, fh, nn); if (!nbl) { - nbl = kmalloc_obj(*nbl, GFP_KERNEL); + nbl = kmalloc_obj(*nbl); if (nbl) { INIT_LIST_HEAD(&nbl->nbl_list); INIT_LIST_HEAD(&nbl->nbl_lru); @@ -974,7 +974,7 @@ struct nfs4_cpntf_state *nfs4_alloc_init_cpntf_state(struct nfsd_net *nn, { struct nfs4_cpntf_state *cps; - cps = kzalloc_obj(struct nfs4_cpntf_state, GFP_KERNEL); + cps = kzalloc_obj(struct nfs4_cpntf_state); if (!cps) return NULL; cps->cpntf_time = ktime_get_boottime_seconds(); @@ -2047,7 +2047,7 @@ static struct nfsd4_session *alloc_session(struct nfsd4_channel_attrs *fattrs, struct nfsd4_slot *slot; int i; - new = kzalloc_obj(*new, GFP_KERNEL); + new = kzalloc_obj(*new); if (!new) return NULL; xa_init(&new->se_slots); @@ -2108,7 +2108,7 @@ static struct nfsd4_conn *alloc_conn(struct svc_rqst *rqstp, u32 flags) { struct nfsd4_conn *conn; - conn = kmalloc_obj(struct nfsd4_conn, GFP_KERNEL); + conn = kmalloc_obj(struct nfsd4_conn); if (!conn) return NULL; svc_xprt_get(rqstp->rq_xprt); @@ -3308,7 +3308,7 @@ static struct nfs4_client *create_client(struct xdr_netobj name, free_client(clp); return NULL; } - clp->cl_ra = kzalloc_obj(*clp->cl_ra, GFP_KERNEL); + clp->cl_ra = kzalloc_obj(*clp->cl_ra); if (!clp->cl_ra) { free_client(clp); return NULL; @@ -8822,7 +8822,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, static inline struct nfs4_client_reclaim * alloc_reclaim(void) { - return kmalloc_obj(struct nfs4_client_reclaim, GFP_KERNEL); + return kmalloc_obj(struct nfs4_client_reclaim); } bool diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index c96d31b7846e..1bee0870d1c7 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2184,7 +2184,7 @@ nfsd4_decode_copy(struct nfsd4_compoundargs *argp, union nfsd4_op_u *u) if (status) return status; - ns_dummy = kmalloc_obj(struct nl4_server, GFP_KERNEL); + ns_dummy = kmalloc_obj(struct nl4_server); if (ns_dummy == NULL) return nfserr_jukebox; for (i = 0; i < count - 1; i++) { @@ -3956,7 +3956,7 @@ nfsd4_encode_fattr4(struct svc_rqst *rqstp, struct xdr_stream *xdr, } if ((attrmask[0] & (FATTR4_WORD0_FILEHANDLE | FATTR4_WORD0_FSID)) && !fhp) { - tempfh = kmalloc_obj(struct svc_fh, GFP_KERNEL); + tempfh = kmalloc_obj(struct svc_fh); status = nfserr_jukebox; if (!tempfh) goto out; diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 777b7bb9aeca..e9acd2cd602c 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -477,7 +477,7 @@ static ssize_t write_pool_threads(struct file *file, char *buf, size_t size) return strlen(buf); } - nthreads = kzalloc_objs(int, npools, GFP_KERNEL); + nthreads = kzalloc_objs(int, npools); rv = -ENOMEM; if (nthreads == NULL) goto out_free; @@ -1596,7 +1596,7 @@ int nfsd_nl_threads_set_doit(struct sk_buff *skb, struct genl_info *info) mutex_lock(&nfsd_mutex); - nthreads = kzalloc_objs(int, nrpools, GFP_KERNEL); + nthreads = kzalloc_objs(int, nrpools); if (!nthreads) { ret = -ENOMEM; goto out_unlock; diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 21c5539c7e84..098a3bd103e0 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -2701,7 +2701,7 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb, struct the_nilfs *nilfs = sb->s_fs_info; struct nilfs_sc_info *sci; - sci = kzalloc_obj(*sci, GFP_KERNEL); + sci = kzalloc_obj(*sci); if (!sci) return NULL; diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 55fac3f83232..7aa5ef8606cd 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -1292,7 +1292,7 @@ static int nilfs_init_fs_context(struct fs_context *fc) { struct nilfs_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index f481532ea8e9..7b23e373a106 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c @@ -56,7 +56,7 @@ struct the_nilfs *alloc_nilfs(struct super_block *sb) { struct the_nilfs *nilfs; - nilfs = kzalloc_obj(*nilfs, GFP_KERNEL); + nilfs = kzalloc_obj(*nilfs); if (!nilfs) return NULL; @@ -877,7 +877,7 @@ nilfs_find_or_create_root(struct the_nilfs *nilfs, __u64 cno) if (root) return root; - new = kzalloc_obj(*root, GFP_KERNEL); + new = kzalloc_obj(*root); if (!new) return NULL; diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 691d36104ae2..c2ed5b11b0fe 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c @@ -644,7 +644,7 @@ static int fsnotify_attach_info_to_sb(struct super_block *sb) struct fsnotify_sb_info *sbinfo; /* sb info is freed on fsnotify_sb_delete() */ - sbinfo = kzalloc_obj(*sbinfo, GFP_KERNEL); + sbinfo = kzalloc_obj(*sbinfo); if (!sbinfo) return -ENOMEM; diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index ce8ce1470981..344fd4d95fbc 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -1202,7 +1202,7 @@ static int ocfs2_add_branch(handle_t *handle, } /* allocate the number of new eb blocks we need */ - new_eb_bhs = kzalloc_objs(struct buffer_head *, new_blocks, GFP_KERNEL); + new_eb_bhs = kzalloc_objs(struct buffer_head *, new_blocks); if (!new_eb_bhs) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 91fb76a43900..ace7debb2f0d 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -2001,7 +2001,7 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g struct o2hb_region *reg = NULL; int ret; - reg = kzalloc_obj(struct o2hb_region, GFP_KERNEL); + reg = kzalloc_obj(struct o2hb_region); if (reg == NULL) return ERR_PTR(-ENOMEM); @@ -2211,7 +2211,7 @@ struct config_group *o2hb_alloc_hb_set(void) struct o2hb_heartbeat_group *hs = NULL; struct config_group *ret = NULL; - hs = kzalloc_obj(struct o2hb_heartbeat_group, GFP_KERNEL); + hs = kzalloc_obj(struct o2hb_heartbeat_group); if (hs == NULL) goto out; diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index 2cb3162aeb89..f7ab66e70799 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -380,7 +380,7 @@ static int sc_common_open(struct file *file, int ctxt) struct o2net_sock_debug *sd; struct o2net_sock_container *dummy_sc; - dummy_sc = kzalloc_obj(*dummy_sc, GFP_KERNEL); + dummy_sc = kzalloc_obj(*dummy_sc); if (!dummy_sc) return -ENOMEM; diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index 6fb8bc38c0f7..402563154550 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c @@ -587,7 +587,7 @@ static struct config_item *o2nm_node_group_make_item(struct config_group *group, if (strlen(name) > O2NM_MAX_NAME_LEN) return ERR_PTR(-ENAMETOOLONG); - node = kzalloc_obj(struct o2nm_node, GFP_KERNEL); + node = kzalloc_obj(struct o2nm_node); if (node == NULL) return ERR_PTR(-ENOMEM); @@ -695,8 +695,8 @@ static struct config_group *o2nm_cluster_group_make_group(struct config_group *g if (o2nm_single_cluster) return ERR_PTR(-ENOSPC); - cluster = kzalloc_obj(struct o2nm_cluster, GFP_KERNEL); - ns = kzalloc_obj(struct o2nm_node_group, GFP_KERNEL); + cluster = kzalloc_obj(struct o2nm_cluster); + ns = kzalloc_obj(struct o2nm_node_group); o2hb_group = o2hb_alloc_hb_set(); if (cluster == NULL || ns == NULL || o2hb_group == NULL) goto out; diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index ff4868619d35..70ca79e4bdc3 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c @@ -1048,7 +1048,7 @@ static int dlm_send_regions(struct dlm_ctxt *dlm, unsigned long *node_map) if (find_first_bit(node_map, O2NM_MAX_NODES) >= O2NM_MAX_NODES) goto bail; - qr = kzalloc_obj(struct dlm_query_region, GFP_KERNEL); + qr = kzalloc_obj(struct dlm_query_region); if (!qr) { ret = -ENOMEM; mlog_errno(ret); @@ -1220,7 +1220,7 @@ static int dlm_send_nodeinfo(struct dlm_ctxt *dlm, unsigned long *node_map) if (find_first_bit(node_map, O2NM_MAX_NODES) >= O2NM_MAX_NODES) goto bail; - qn = kzalloc_obj(struct dlm_query_nodeinfo, GFP_KERNEL); + qn = kzalloc_obj(struct dlm_query_nodeinfo); if (!qn) { ret = -ENOMEM; mlog_errno(ret); @@ -1592,7 +1592,7 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm) mlog(0, "%p", dlm); - ctxt = kzalloc_obj(*ctxt, GFP_KERNEL); + ctxt = kzalloc_obj(*ctxt); if (!ctxt) { status = -ENOMEM; mlog_errno(status); @@ -1946,7 +1946,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain, int ret; struct dlm_ctxt *dlm = NULL; - dlm = kzalloc_obj(*dlm, GFP_KERNEL); + dlm = kzalloc_obj(*dlm); if (!dlm) { ret = -ENOMEM; mlog_errno(ret); diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 627d488b0148..bd2ddb7d841d 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3030,7 +3030,7 @@ struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void) { struct ocfs2_dlm_debug *dlm_debug; - dlm_debug = kmalloc_obj(struct ocfs2_dlm_debug, GFP_KERNEL); + dlm_debug = kmalloc_obj(struct ocfs2_dlm_debug); if (!dlm_debug) { mlog_errno(-ENOMEM); goto out; diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 70879058b0c9..7df9921c1a38 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -54,7 +54,7 @@ static int ocfs2_init_file_private(struct inode *inode, struct file *file) { struct ocfs2_file_private *fp; - fp = kzalloc_obj(struct ocfs2_file_private, GFP_KERNEL); + fp = kzalloc_obj(struct ocfs2_file_private); if (!fp) return -ENOMEM; diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 872b826979ec..bfed0fb35f9b 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c @@ -334,7 +334,7 @@ static int ocfs2_info_handle_freeinode(struct inode *inode, struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct inode *inode_alloc = NULL; - oifi = kzalloc_obj(struct ocfs2_info_freeinode, GFP_KERNEL); + oifi = kzalloc_obj(struct ocfs2_info_freeinode); if (!oifi) { status = -ENOMEM; mlog_errno(status); @@ -620,7 +620,7 @@ static int ocfs2_info_handle_freefrag(struct inode *inode, struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); struct inode *gb_inode = NULL; - oiff = kzalloc_obj(struct ocfs2_info_freefrag, GFP_KERNEL); + oiff = kzalloc_obj(struct ocfs2_info_freefrag); if (!oiff) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 1b9359304aef..6755f38920bc 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -876,7 +876,7 @@ int ocfs2_journal_alloc(struct ocfs2_super *osb) int status = 0; struct ocfs2_journal *journal; - journal = kzalloc_obj(struct ocfs2_journal, GFP_KERNEL); + journal = kzalloc_obj(struct ocfs2_journal); if (!journal) { mlog(ML_ERROR, "unable to alloc journal\n"); status = -ENOMEM; diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 29fa6fb11ea5..82d290cf4432 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -1094,7 +1094,7 @@ static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb, { int status; - *ac = kzalloc_obj(struct ocfs2_alloc_context, GFP_KERNEL); + *ac = kzalloc_obj(struct ocfs2_alloc_context); if (!(*ac)) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 85ad1a9db734..268b79339a51 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -1736,7 +1736,7 @@ static int ocfs2_create_symlink_data(struct ocfs2_super *osb, goto bail; } - bhs = kzalloc_objs(struct buffer_head *, blocks, GFP_KERNEL); + bhs = kzalloc_objs(struct buffer_head *, blocks); if (!bhs) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index 78a97c37398b..7a55b1a071db 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c @@ -334,7 +334,7 @@ static int o2cb_cluster_connect(struct ocfs2_cluster_connection *conn) goto out; } - priv = kzalloc_obj(struct o2dlm_private, GFP_KERNEL); + priv = kzalloc_obj(struct o2dlm_private); if (!priv) { rc = -ENOMEM; goto out_free; diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 11b34407de36..5803f1dee679 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c @@ -593,7 +593,7 @@ static int ocfs2_control_open(struct inode *inode, struct file *file) { struct ocfs2_control_private *p; - p = kzalloc_obj(struct ocfs2_control_private, GFP_KERNEL); + p = kzalloc_obj(struct ocfs2_control_private); if (!p) return -ENOMEM; p->op_this_node = -1; @@ -967,7 +967,7 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn) BUG_ON(conn == NULL); - lc = kzalloc_obj(struct ocfs2_live_connection, GFP_KERNEL); + lc = kzalloc_obj(struct ocfs2_live_connection); if (!lc) return -ENOMEM; diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index 46ff5835da2e..741d6191d871 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c @@ -328,7 +328,7 @@ int ocfs2_cluster_connect(const char *stack_name, goto out; } - new_conn = kzalloc_obj(struct ocfs2_cluster_connection, GFP_KERNEL); + new_conn = kzalloc_obj(struct ocfs2_cluster_connection); if (!new_conn) { rc = -ENOMEM; goto out; diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 872c7b303a3c..bb98bd51338e 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c @@ -1034,7 +1034,7 @@ int ocfs2_reserve_new_metadata_blocks(struct ocfs2_super *osb, int status; int slot = ocfs2_get_meta_steal_slot(osb); - *ac = kzalloc_obj(struct ocfs2_alloc_context, GFP_KERNEL); + *ac = kzalloc_obj(struct ocfs2_alloc_context); if (!(*ac)) { status = -ENOMEM; mlog_errno(status); @@ -1105,7 +1105,7 @@ int ocfs2_reserve_new_inode(struct ocfs2_super *osb, int slot = ocfs2_get_inode_steal_slot(osb); u64 alloc_group; - *ac = kzalloc_obj(struct ocfs2_alloc_context, GFP_KERNEL); + *ac = kzalloc_obj(struct ocfs2_alloc_context); if (!(*ac)) { status = -ENOMEM; mlog_errno(status); @@ -1221,7 +1221,7 @@ static int ocfs2_reserve_clusters_with_limit(struct ocfs2_super *osb, int status, ret = 0; int retried = 0; - *ac = kzalloc_obj(struct ocfs2_alloc_context, GFP_KERNEL); + *ac = kzalloc_obj(struct ocfs2_alloc_context); if (!(*ac)) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 9779f524ff1a..d7c58fd7d438 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1200,7 +1200,7 @@ static int ocfs2_init_fs_context(struct fs_context *fc) { struct mount_options *mopt; - mopt = kzalloc_obj(struct mount_options, GFP_KERNEL); + mopt = kzalloc_obj(struct mount_options); if (!mopt) return -EINVAL; @@ -1953,7 +1953,7 @@ static int ocfs2_initialize_super(struct super_block *sb, struct ocfs2_super *osb; u64 total_blocks; - osb = kzalloc_obj(struct ocfs2_super, GFP_KERNEL); + osb = kzalloc_obj(struct ocfs2_super); if (!osb) { status = -ENOMEM; mlog_errno(status); diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index ba2a581f7ab7..90ae07c69349 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -464,7 +464,7 @@ static int omfs_fill_super(struct super_block *sb, struct fs_context *fc) int ret = -EINVAL; int silent = fc->sb_flags & SB_SILENT; - sbi = kzalloc_obj(struct omfs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct omfs_sb_info); if (!sbi) return -ENOMEM; @@ -612,7 +612,7 @@ static int omfs_init_fs_context(struct fs_context *fc) { struct omfs_mount_options *opts; - opts = kzalloc_obj(*opts, GFP_KERNEL); + opts = kzalloc_obj(*opts); if (!opts) return -ENOMEM; diff --git a/fs/orangefs/dir.c b/fs/orangefs/dir.c index 84db9f0db9df..6e2ebc8b9867 100644 --- a/fs/orangefs/dir.c +++ b/fs/orangefs/dir.c @@ -363,7 +363,7 @@ static int orangefs_dir_iterate(struct file *file, static int orangefs_dir_open(struct inode *inode, struct file *file) { struct orangefs_dir *od; - file->private_data = kmalloc_obj(struct orangefs_dir, GFP_KERNEL); + file->private_data = kmalloc_obj(struct orangefs_dir); if (!file->private_data) return -ENOMEM; od = file->private_data; diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 50836be41cd2..2d4710d0e05e 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -184,16 +184,16 @@ static int orangefs_writepages(struct address_space *mapping, int error; struct folio *folio = NULL; - ow = kzalloc_obj(struct orangefs_writepages, GFP_KERNEL); + ow = kzalloc_obj(struct orangefs_writepages); if (!ow) return -ENOMEM; ow->maxpages = orangefs_bufmap_size_query()/PAGE_SIZE; - ow->folios = kzalloc_objs(struct folio *, ow->maxpages, GFP_KERNEL); + ow->folios = kzalloc_objs(struct folio *, ow->maxpages); if (!ow->folios) { kfree(ow); return -ENOMEM; } - ow->bv = kzalloc_objs(struct bio_vec, ow->maxpages, GFP_KERNEL); + ow->bv = kzalloc_objs(struct bio_vec, ow->maxpages); if (!ow->bv) { kfree(ow->folios); kfree(ow); @@ -328,7 +328,7 @@ static int orangefs_write_begin(const struct kiocb *iocb, } } - wr = kmalloc_obj(*wr, GFP_KERNEL); + wr = kmalloc_obj(*wr); if (!wr) return -ENOMEM; @@ -644,7 +644,7 @@ vm_fault_t orangefs_page_mkwrite(struct vm_fault *vmf) } } } - wr = kmalloc_obj(*wr, GFP_KERNEL); + wr = kmalloc_obj(*wr); if (!wr) { ret = VM_FAULT_LOCKED|VM_FAULT_RETRY; goto out; diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c index bad105dd10fa..c54266c75eed 100644 --- a/fs/orangefs/orangefs-bufmap.c +++ b/fs/orangefs/orangefs-bufmap.c @@ -205,7 +205,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) { struct orangefs_bufmap *bufmap; - bufmap = kzalloc_obj(*bufmap, GFP_KERNEL); + bufmap = kzalloc_obj(*bufmap); if (!bufmap) goto out; @@ -228,7 +228,7 @@ orangefs_bufmap_alloc(struct ORANGEFS_dev_map_desc *user_desc) /* allocate storage to track our page mappings */ bufmap->page_array = - kzalloc_objs(struct page *, bufmap->page_count, GFP_KERNEL); + kzalloc_objs(struct page *, bufmap->page_count); if (!bufmap->page_array) goto out_free_desc_array; diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c index 229981c310bd..e82b934ed074 100644 --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -560,7 +560,7 @@ static int orangefs_prepare_cdm_array(char *debug_array_string) goto out; } - cdm_array = kzalloc_objs(*cdm_array, cdm_element_count, GFP_KERNEL); + cdm_array = kzalloc_objs(*cdm_array, cdm_element_count); if (!cdm_array) { rc = -ENOMEM; goto out; diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c index 30bc3c17daa4..f591f09531da 100644 --- a/fs/orangefs/orangefs-mod.c +++ b/fs/orangefs/orangefs-mod.c @@ -99,7 +99,7 @@ static int __init orangefs_init(void) goto cleanup_op; orangefs_htable_ops_in_progress = - kzalloc_objs(struct list_head, hash_table_size, GFP_KERNEL); + kzalloc_objs(struct list_head, hash_table_size); if (!orangefs_htable_ops_in_progress) { ret = -ENOMEM; goto cleanup_inode; diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c index 8ea25b71b1fb..a02bfc7b3542 100644 --- a/fs/orangefs/orangefs-sysfs.c +++ b/fs/orangefs/orangefs-sysfs.c @@ -1170,7 +1170,7 @@ int orangefs_sysfs_init(void) gossip_debug(GOSSIP_SYSFS_DEBUG, "orangefs_sysfs_init: start\n"); /* create /sys/fs/orangefs. */ - orangefs_obj = kzalloc_obj(*orangefs_obj, GFP_KERNEL); + orangefs_obj = kzalloc_obj(*orangefs_obj); if (!orangefs_obj) goto out; @@ -1185,7 +1185,7 @@ int orangefs_sysfs_init(void) kobject_uevent(orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/acache. */ - acache_orangefs_obj = kzalloc_obj(*acache_orangefs_obj, GFP_KERNEL); + acache_orangefs_obj = kzalloc_obj(*acache_orangefs_obj); if (!acache_orangefs_obj) { rc = -EINVAL; goto ofs_obj_bail; @@ -1202,7 +1202,7 @@ int orangefs_sysfs_init(void) kobject_uevent(acache_orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/capcache. */ - capcache_orangefs_obj = kzalloc_obj(*capcache_orangefs_obj, GFP_KERNEL); + capcache_orangefs_obj = kzalloc_obj(*capcache_orangefs_obj); if (!capcache_orangefs_obj) { rc = -EINVAL; goto acache_obj_bail; @@ -1218,7 +1218,7 @@ int orangefs_sysfs_init(void) kobject_uevent(capcache_orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/ccache. */ - ccache_orangefs_obj = kzalloc_obj(*ccache_orangefs_obj, GFP_KERNEL); + ccache_orangefs_obj = kzalloc_obj(*ccache_orangefs_obj); if (!ccache_orangefs_obj) { rc = -EINVAL; goto capcache_obj_bail; @@ -1234,7 +1234,7 @@ int orangefs_sysfs_init(void) kobject_uevent(ccache_orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/ncache. */ - ncache_orangefs_obj = kzalloc_obj(*ncache_orangefs_obj, GFP_KERNEL); + ncache_orangefs_obj = kzalloc_obj(*ncache_orangefs_obj); if (!ncache_orangefs_obj) { rc = -EINVAL; goto ccache_obj_bail; @@ -1251,7 +1251,7 @@ int orangefs_sysfs_init(void) kobject_uevent(ncache_orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/perf_counters. */ - pc_orangefs_obj = kzalloc_obj(*pc_orangefs_obj, GFP_KERNEL); + pc_orangefs_obj = kzalloc_obj(*pc_orangefs_obj); if (!pc_orangefs_obj) { rc = -EINVAL; goto ncache_obj_bail; @@ -1268,7 +1268,7 @@ int orangefs_sysfs_init(void) kobject_uevent(pc_orangefs_obj, KOBJ_ADD); /* create /sys/fs/orangefs/stats. */ - stats_orangefs_obj = kzalloc_obj(*stats_orangefs_obj, GFP_KERNEL); + stats_orangefs_obj = kzalloc_obj(*stats_orangefs_obj); if (!stats_orangefs_obj) { rc = -EINVAL; goto pc_obj_bail; diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 3030509ddeaf..4ec7329b41f6 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -578,7 +578,7 @@ int orangefs_init_fs_context(struct fs_context *fc) { struct orangefs_sb_info_s *osi; - osi = kzalloc_obj(struct orangefs_sb_info_s, GFP_KERNEL); + osi = kzalloc_obj(struct orangefs_sb_info_s); if (!osi) return -ENOMEM; diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index 44712bcdcef7..1b372189cd10 100644 --- a/fs/orangefs/xattr.c +++ b/fs/orangefs/xattr.c @@ -171,7 +171,7 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name, " does not exist!\n", get_khandle_from_ino(inode), (char *)new_op->upcall.req.getxattr.key); - cx = kmalloc_obj(*cx, GFP_KERNEL); + cx = kmalloc_obj(*cx); if (cx) { strscpy(cx->key, name); cx->length = -1; @@ -225,7 +225,7 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name, cx->length = length; cx->timeout = jiffies + HZ; } else { - cx = kmalloc_obj(*cx, GFP_KERNEL); + cx = kmalloc_obj(*cx); if (cx) { strscpy(cx->key, name); memcpy(cx->val, buffer, length); diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 7f7a2c2a7937..97bed2286030 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -96,7 +96,7 @@ struct ovl_file { struct ovl_file *ovl_file_alloc(struct file *realfile) { - struct ovl_file *of = kzalloc_obj(struct ovl_file, GFP_KERNEL); + struct ovl_file *of = kzalloc_obj(struct ovl_file); if (unlikely(!of)) return NULL; diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index f30b81ee0d9b..d8dd4b052984 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -481,7 +481,7 @@ int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected, goto invalid; if (!*stackp) - *stackp = kmalloc_obj(struct ovl_path, GFP_KERNEL); + *stackp = kmalloc_obj(struct ovl_path); if (!*stackp) { dput(origin); return -ENOMEM; diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c index af735a0c310a..8111b437ae5d 100644 --- a/fs/overlayfs/params.c +++ b/fs/overlayfs/params.c @@ -790,7 +790,7 @@ int ovl_init_fs_context(struct fs_context *fc) goto out_err; ctx->capacity = 3; - ofs = kzalloc_obj(struct ovl_fs, GFP_KERNEL); + ofs = kzalloc_obj(struct ovl_fs); if (!ofs) goto out_err; diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index 953c2cdca1b4..a4271e5fb8e6 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c @@ -493,7 +493,7 @@ static struct ovl_dir_cache *ovl_cache_get(struct dentry *dentry) } ovl_set_dir_cache(d_inode(dentry), NULL); - cache = kzalloc_obj(struct ovl_dir_cache, GFP_KERNEL); + cache = kzalloc_obj(struct ovl_dir_cache); if (!cache) return ERR_PTR(-ENOMEM); @@ -706,7 +706,7 @@ static struct ovl_dir_cache *ovl_cache_get_impure(const struct path *path) ovl_dir_cache_free(inode); ovl_set_dir_cache(inode, NULL); - cache = kzalloc_obj(struct ovl_dir_cache, GFP_KERNEL); + cache = kzalloc_obj(struct ovl_dir_cache); if (!cache) return ERR_PTR(-ENOMEM); diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index f3a39b7703f5..d4c12feec039 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1031,7 +1031,7 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, unsigned int i; size_t nr_merged_lower; - ofs->fs = kzalloc_objs(struct ovl_sb, ctx->nr + 2, GFP_KERNEL); + ofs->fs = kzalloc_objs(struct ovl_sb, ctx->nr + 2); if (ofs->fs == NULL) return -ENOMEM; @@ -1393,7 +1393,7 @@ static int ovl_fill_super_creds(struct fs_context *fc, struct super_block *sb) } err = -ENOMEM; - layers = kzalloc_objs(struct ovl_layer, ctx->nr + 1, GFP_KERNEL); + layers = kzalloc_objs(struct ovl_layer, ctx->nr + 1); if (!layers) return err; diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c index a28524e83662..4eeafd943fb9 100644 --- a/fs/overlayfs/util.c +++ b/fs/overlayfs/util.c @@ -113,7 +113,7 @@ bool ovl_verify_lower(struct super_block *sb) struct ovl_path *ovl_stack_alloc(unsigned int n) { - return kzalloc_objs(struct ovl_path, n, GFP_KERNEL); + return kzalloc_objs(struct ovl_path, n); } void ovl_stack_cpy(struct ovl_path *dst, struct ovl_path *src, unsigned int n) diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 55438bc0afc8..390547b992ac 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -143,7 +143,7 @@ static int kcore_ram_list(struct list_head *head) { struct kcore_list *ent; - ent = kmalloc_obj(*ent, GFP_KERNEL); + ent = kmalloc_obj(*ent); if (!ent) return -ENOMEM; ent->addr = (unsigned long)__va(0); @@ -178,7 +178,7 @@ get_sparsemem_vmemmap_info(struct kcore_list *ent, struct list_head *head) end = tmp->addr; } if (start < end) { - vmm = kmalloc_obj(*vmm, GFP_KERNEL); + vmm = kmalloc_obj(*vmm); if (!vmm) return 0; vmm->addr = start; @@ -210,7 +210,7 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg) p = pfn_to_page(pfn); - ent = kmalloc_obj(*ent, GFP_KERNEL); + ent = kmalloc_obj(*ent); if (!ent) return -ENOMEM; ent->addr = (unsigned long)page_to_virt(p); diff --git a/fs/proc/root.c b/fs/proc/root.c index fb0ccacb08e6..0f9100559471 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -249,7 +249,7 @@ static int proc_fill_super(struct super_block *s, struct fs_context *fc) struct proc_fs_info *fs_info; int ret; - fs_info = kzalloc_obj(*fs_info, GFP_KERNEL); + fs_info = kzalloc_obj(*fs_info); if (!fs_info) return -ENOMEM; @@ -331,7 +331,7 @@ static int proc_init_fs_context(struct fs_context *fc) { struct proc_fs_context *ctx; - ctx = kzalloc_obj(struct proc_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct proc_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 0418511f69fe..e091931d7ca1 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -2981,7 +2981,7 @@ static int pagemap_scan_init_bounce_buffer(struct pagemap_scan_private *p) p->vec_buf_len = min_t(size_t, PAGEMAP_WALK_SIZE >> PAGE_SHIFT, p->arg.vec_len); - p->vec_buf = kmalloc_objs(*p->vec_buf, p->vec_buf_len, GFP_KERNEL); + p->vec_buf = kmalloc_objs(*p->vec_buf, p->vec_buf_len); if (!p->vec_buf) return -ENOMEM; diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c index 0c9c8b6fdbb8..12070b6a7b11 100644 --- a/fs/pstore/blk.c +++ b/fs/pstore/blk.c @@ -297,7 +297,7 @@ static int __init __best_effort_init(void) return -EINVAL; } - best_effort_dev = kzalloc_obj(*best_effort_dev, GFP_KERNEL); + best_effort_dev = kzalloc_obj(*best_effort_dev); if (!best_effort_dev) return -ENOMEM; diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 8ebcd231e09a..83fa0bb3435a 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -70,7 +70,7 @@ static void *pstore_ftrace_seq_start(struct seq_file *s, loff_t *pos) struct pstore_private *ps = s->private; struct pstore_ftrace_seq_data *data __free(kfree) = NULL; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return NULL; @@ -365,7 +365,7 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) record->psi->name, record->id, record->compressed ? ".enc.z" : ""); - private = kzalloc_obj(*private, GFP_KERNEL); + private = kzalloc_obj(*private); if (!private) return -ENOMEM; @@ -477,7 +477,7 @@ static int pstore_init_fs_context(struct fs_context *fc) { struct pstore_context *ctx; - ctx = kzalloc_obj(struct pstore_context, GFP_KERNEL); + ctx = kzalloc_obj(struct pstore_context); if (!ctx) return -ENOMEM; diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index ff9603bb89db..1d76c9d92056 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -683,7 +683,7 @@ void pstore_get_backend_records(struct pstore_info *psi, struct pstore_record *record; int rc; - record = kzalloc_obj(*record, GFP_KERNEL); + record = kzalloc_obj(*record); if (!record) { pr_err("out of memory creating record\n"); break; diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 79f801c913bf..c1cbf2fd1c0f 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -539,7 +539,7 @@ static int ramoops_init_przs(const char *name, goto fail; } - prz_ar = kzalloc_objs(**przs, *cnt, GFP_KERNEL); + prz_ar = kzalloc_objs(**przs, *cnt); if (!prz_ar) goto fail; diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 49d022b85d8a..7930c886dbf5 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -438,7 +438,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size, return NULL; } - pages = kmalloc_objs(struct page *, page_count, GFP_KERNEL); + pages = kmalloc_objs(struct page *, page_count); if (!pages) { pr_err("%s: Failed to allocate array for %u pages\n", __func__, page_count); @@ -605,7 +605,7 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, struct persistent_ram_zone *prz; int ret = -ENOMEM; - prz = kzalloc_obj(struct persistent_ram_zone, GFP_KERNEL); + prz = kzalloc_obj(struct persistent_ram_zone); if (!prz) { pr_err("failed to allocate persistent ram zone\n"); goto err; diff --git a/fs/pstore/zone.c b/fs/pstore/zone.c index 6687d255a36b..a3b003f9a3a0 100644 --- a/fs/pstore/zone.c +++ b/fs/pstore/zone.c @@ -1166,7 +1166,7 @@ static struct pstore_zone *psz_init_zone(enum pstore_type_id type, return ERR_PTR(-ENOMEM); } - zone = kzalloc_obj(struct pstore_zone, GFP_KERNEL); + zone = kzalloc_obj(struct pstore_zone); if (!zone) return ERR_PTR(-ENOMEM); @@ -1218,7 +1218,7 @@ static struct pstore_zone **psz_init_zones(enum pstore_type_id type, return ERR_PTR(-EINVAL); } - zones = kzalloc_objs(*zones, c, GFP_KERNEL); + zones = kzalloc_objs(*zones, c); if (!zones) { pr_err("allocate for zones %s failed\n", name); return ERR_PTR(-ENOMEM); diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index e8c4de5de7be..8aeb63d397cf 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -197,7 +197,7 @@ static int qnx4_fill_super(struct super_block *s, struct fs_context *fc) struct qnx4_sb_info *qs; int silent = fc->sb_flags & SB_SILENT; - qs = kzalloc_obj(struct qnx4_sb_info, GFP_KERNEL); + qs = kzalloc_obj(struct qnx4_sb_info); if (!qs) return -ENOMEM; s->s_fs_info = qs; diff --git a/fs/qnx6/inode.c b/fs/qnx6/inode.c index de1e1a61810d..c4049bb8bd60 100644 --- a/fs/qnx6/inode.c +++ b/fs/qnx6/inode.c @@ -302,7 +302,7 @@ static int qnx6_fill_super(struct super_block *s, struct fs_context *fc) int bootblock_offset = QNX6_BOOTBLOCK_SIZE; int silent = fc->sb_flags & SB_SILENT; - qs = kzalloc_obj(struct qnx6_sb_info, GFP_KERNEL); + qs = kzalloc_obj(struct qnx6_sb_info); if (!qs) return -ENOMEM; s->s_fs_info = qs; @@ -645,7 +645,7 @@ static int qnx6_init_fs_context(struct fs_context *fc) { struct qnx6_context *ctx; - ctx = kzalloc_obj(struct qnx6_context, GFP_KERNEL); + ctx = kzalloc_obj(struct qnx6_context); if (!ctx) return -ENOMEM; fc->ops = &qnx6_context_ops; diff --git a/fs/qnx6/super_mmi.c b/fs/qnx6/super_mmi.c index d36ade7fc477..b8afb6f388b2 100644 --- a/fs/qnx6/super_mmi.c +++ b/fs/qnx6/super_mmi.c @@ -100,7 +100,7 @@ struct qnx6_super_block *qnx6_mmi_fill_super(struct super_block *s, int silent) goto out; } - qsb = kmalloc_obj(*qsb, GFP_KERNEL); + qsb = kmalloc_obj(*qsb); if (!qsb) { pr_err("unable to allocate memory.\n"); goto out; diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c index d022b18782c6..a24fab5f9f80 100644 --- a/fs/quota/quota_v2.c +++ b/fs/quota/quota_v2.c @@ -121,7 +121,7 @@ static int v2_read_file_info(struct super_block *sb, int type) ret = -EIO; goto out; } - info->dqi_priv = kmalloc_obj(struct qtree_mem_dqinfo, GFP_KERNEL); + info->dqi_priv = kmalloc_obj(struct qtree_mem_dqinfo); if (!info->dqi_priv) { ret = -ENOMEM; goto out; diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index d084b6804b65..3987639ed132 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -298,7 +298,7 @@ int ramfs_init_fs_context(struct fs_context *fc) { struct ramfs_fs_info *fsi; - fsi = kzalloc_obj(*fsi, GFP_KERNEL); + fsi = kzalloc_obj(*fsi); if (!fsi) return -ENOMEM; diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 6fd5c0e8a0dd..49f3f6b846b2 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -923,7 +923,7 @@ int setup_rmid_lru_list(void) return 0; idx_limit = resctrl_arch_system_num_rmid_idx(); - rmid_ptrs = kzalloc_objs(struct rmid_entry, idx_limit, GFP_KERNEL); + rmid_ptrs = kzalloc_objs(struct rmid_entry, idx_limit); if (!rmid_ptrs) return -ENOMEM; diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c index 55e71d257324..fa3687d69ebd 100644 --- a/fs/resctrl/pseudo_lock.c +++ b/fs/resctrl/pseudo_lock.c @@ -154,7 +154,7 @@ static int pseudo_lock_cstates_constrain(struct pseudo_lock_region *plr) int ret; for_each_cpu(cpu, &plr->d->hdr.cpu_mask) { - pm_req = kzalloc_obj(*pm_req, GFP_KERNEL); + pm_req = kzalloc_obj(*pm_req); if (!pm_req) { rdt_last_cmd_puts("Failure to allocate memory for PM QoS\n"); ret = -ENOMEM; @@ -270,7 +270,7 @@ static int pseudo_lock_init(struct rdtgroup *rdtgrp) { struct pseudo_lock_region *plr; - plr = kzalloc_obj(*plr, GFP_KERNEL); + plr = kzalloc_obj(*plr); if (!plr) return -ENOMEM; diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 1135208adafb..5da305bd36c9 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2686,7 +2686,7 @@ static int schemata_list_add(struct rdt_resource *r, enum resctrl_conf_type type const char *suffix = ""; int ret, cl; - s = kzalloc_obj(*s, GFP_KERNEL); + s = kzalloc_obj(*s); if (!s) return -ENOMEM; @@ -2966,7 +2966,7 @@ static int rdt_init_fs_context(struct fs_context *fc) { struct rdt_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; @@ -3117,7 +3117,7 @@ static struct mon_data *mon_get_kn_priv(enum resctrl_res_level rid, int domid, return priv; } - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return NULL; @@ -3753,7 +3753,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, } /* allocate the rdtgroup. */ - rdtgrp = kzalloc_obj(*rdtgrp, GFP_KERNEL); + rdtgrp = kzalloc_obj(*rdtgrp); if (!rdtgrp) { ret = -ENOSPC; rdt_last_cmd_puts("Kernel out of memory\n"); diff --git a/fs/signalfd.c b/fs/signalfd.c index 0b663f9c1cff..dff53745e352 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -264,7 +264,7 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags) int fd; struct signalfd_ctx *ctx __free(kfree) = NULL; - ctx = kmalloc_obj(*ctx, GFP_KERNEL); + ctx = kmalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 94574dab56f6..c327c246a9b4 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -813,7 +813,7 @@ struct cached_fids *init_cached_dirs(void) { struct cached_fids *cfids; - cfids = kzalloc_obj(*cfids, GFP_KERNEL); + cfids = kzalloc_obj(*cfids); if (!cfids) return NULL; spin_lock_init(&cfids->cfid_list_lock); diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c index 85ffb8cfe320..6fa12c901c14 100644 --- a/fs/smb/client/cifsacl.c +++ b/fs/smb/client/cifsacl.c @@ -805,7 +805,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl, offsetof(struct smb_sid, sub_auth) + sizeof(__le16))) return; - ppace = kmalloc_objs(struct smb_ace *, num_aces, GFP_KERNEL); + ppace = kmalloc_objs(struct smb_ace *, num_aces); if (!ppace) return; @@ -1331,7 +1331,7 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd, if (uid_valid(uid)) { /* chown */ uid_t id; - nowner_sid_ptr = kzalloc_obj(struct smb_sid, GFP_KERNEL); + nowner_sid_ptr = kzalloc_obj(struct smb_sid); if (!nowner_sid_ptr) { rc = -ENOMEM; goto chown_chgrp_exit; @@ -1359,7 +1359,7 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd, } if (gid_valid(gid)) { /* chgrp */ gid_t id; - ngroup_sid_ptr = kzalloc_obj(struct smb_sid, GFP_KERNEL); + ngroup_sid_ptr = kzalloc_obj(struct smb_sid); if (!ngroup_sid_ptr) { rc = -ENOMEM; goto chown_chgrp_exit; diff --git a/fs/smb/client/cifsencrypt.c b/fs/smb/client/cifsencrypt.c index b717b348e98e..3d731f3af235 100644 --- a/fs/smb/client/cifsencrypt.c +++ b/fs/smb/client/cifsencrypt.c @@ -500,7 +500,7 @@ calc_seckey(struct cifs_ses *ses) get_random_bytes(sec_key, CIFS_SESS_KEY_SIZE); - ctx_arc4 = kmalloc_obj(*ctx_arc4, GFP_KERNEL); + ctx_arc4 = kmalloc_obj(*ctx_arc4); if (!ctx_arc4) { cifs_dbg(VFS, "Could not allocate arc4 context\n"); return -ENOMEM; diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index 85a53cd77f9e..99b04234a08e 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -1016,11 +1016,11 @@ cifs_smb3_do_mount(struct file_system_type *fs_type, } else { cifs_info("Attempting to mount %s\n", old_ctx->source); } - cifs_sb = kzalloc_obj(*cifs_sb, GFP_KERNEL); + cifs_sb = kzalloc_obj(*cifs_sb); if (!cifs_sb) return ERR_PTR(-ENOMEM); - cifs_sb->ctx = kzalloc_obj(struct smb3_fs_context, GFP_KERNEL); + cifs_sb->ctx = kzalloc_obj(struct smb3_fs_context); if (!cifs_sb->ctx) { root = ERR_PTR(-ENOMEM); goto out; diff --git a/fs/smb/client/compress.c b/fs/smb/client/compress.c index ae536aa63ef1..3d1e73f5d9af 100644 --- a/fs/smb/client/compress.c +++ b/fs/smb/client/compress.c @@ -229,7 +229,7 @@ static bool is_compressible(const struct iov_iter *data) if (has_repeated_data(sample, len)) goto out; - bkt = kzalloc_objs(*bkt, bkt_size, GFP_KERNEL); + bkt = kzalloc_objs(*bkt, bkt_size); if (!bkt) { WARN_ON_ONCE(1); ret = false; diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index c7ed2ffb66ee..33dfe116ca52 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -1755,7 +1755,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx, if (tcp_ses) return tcp_ses; - tcp_ses = kzalloc_obj(struct TCP_Server_Info, GFP_KERNEL); + tcp_ses = kzalloc_obj(struct TCP_Server_Info); if (!tcp_ses) { rc = -ENOMEM; goto out_err; @@ -3674,7 +3674,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, struct tcon_link *tlink; /* hang the tcon off of the superblock */ - tlink = kzalloc_obj(*tlink, GFP_KERNEL); + tlink = kzalloc_obj(*tlink); if (tlink == NULL) return -ENOMEM; @@ -3798,7 +3798,7 @@ mchan_mount_alloc(struct cifs_ses *ses) { struct mchan_mount *mchan_mount; - mchan_mount = kzalloc_obj(*mchan_mount, GFP_KERNEL); + mchan_mount = kzalloc_obj(*mchan_mount); if (!mchan_mount) return ERR_PTR(-ENOMEM); @@ -4193,7 +4193,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) struct smb3_fs_context *ctx; char *origin_fullpath = NULL; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (ctx == NULL) return ERR_PTR(-ENOMEM); @@ -4367,7 +4367,7 @@ cifs_sb_tlink(struct cifs_sb_info *cifs_sb) spin_unlock(&cifs_sb->tlink_tree_lock); if (tlink == NULL) { - newtlink = kzalloc_obj(*tlink, GFP_KERNEL); + newtlink = kzalloc_obj(*tlink); if (newtlink == NULL) return ERR_PTR(-ENOMEM); newtlink->tl_uid = fsuid; diff --git a/fs/smb/client/dfs.h b/fs/smb/client/dfs.h index 0401c55517b8..16ac2cdd5c82 100644 --- a/fs/smb/client/dfs.h +++ b/fs/smb/client/dfs.h @@ -46,7 +46,7 @@ static inline struct dfs_ref_walk *ref_walk_alloc(void) { struct dfs_ref_walk *rw; - rw = kmalloc_obj(*rw, GFP_KERNEL); + rw = kmalloc_obj(*rw); if (!rw) return ERR_PTR(-ENOMEM); return rw; diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 43b5b48f5a67..18f31d4eb98d 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -489,7 +489,7 @@ int cifs_posix_open(const char *full_path, struct inode **pinode, cifs_dbg(FYI, "posix open %s\n", full_path); - presp_data = kzalloc_obj(FILE_UNIX_BASIC_INFO, GFP_KERNEL); + presp_data = kzalloc_obj(FILE_UNIX_BASIC_INFO); if (presp_data == NULL) return -ENOMEM; @@ -673,11 +673,11 @@ struct cifsFileInfo *cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, struct cifs_tcon *tcon = tlink_tcon(tlink); struct TCP_Server_Info *server = tcon->ses->server; - cfile = kzalloc_obj(struct cifsFileInfo, GFP_KERNEL); + cfile = kzalloc_obj(struct cifsFileInfo); if (cfile == NULL) return cfile; - fdlocks = kzalloc_obj(struct cifs_fid_locks, GFP_KERNEL); + fdlocks = kzalloc_obj(struct cifs_fid_locks); if (!fdlocks) { kfree(cfile); return NULL; @@ -1458,7 +1458,7 @@ int cifs_close(struct inode *inode, struct file *file) if (file->private_data != NULL) { cfile = file->private_data; file->private_data = NULL; - dclose = kmalloc_obj(struct cifs_deferred_close, GFP_KERNEL); + dclose = kmalloc_obj(struct cifs_deferred_close); if ((cfile->status_file_deleted == false) && (smb2_can_defer_close(inode, dclose))) { if (test_and_clear_bit(NETFS_ICTX_MODIFIED_ATTR, &cinode->netfs.flags)) { @@ -1582,7 +1582,7 @@ static struct cifsLockInfo * cifs_lock_init(__u64 offset, __u64 length, __u8 type, __u16 flags) { struct cifsLockInfo *lock = - kmalloc_obj(struct cifsLockInfo, GFP_KERNEL); + kmalloc_obj(struct cifsLockInfo); if (!lock) return lock; lock->offset = offset; @@ -1853,7 +1853,7 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile) PAGE_SIZE); max_num = (max_buf - sizeof(struct smb_hdr)) / sizeof(LOCKING_ANDX_RANGE); - buf = kzalloc_objs(LOCKING_ANDX_RANGE, max_num, GFP_KERNEL); + buf = kzalloc_objs(LOCKING_ANDX_RANGE, max_num); if (!buf) { free_xid(xid); return -ENOMEM; @@ -1945,7 +1945,7 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile) * protects locking operations of this inode. */ for (i = 0; i < count; i++) { - lck = kmalloc_obj(struct lock_to_push, GFP_KERNEL); + lck = kmalloc_obj(struct lock_to_push); if (!lck) { rc = -ENOMEM; goto err_out; @@ -2229,7 +2229,7 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, PAGE_SIZE); max_num = (max_buf - sizeof(struct smb_hdr)) / sizeof(LOCKING_ANDX_RANGE); - buf = kzalloc_objs(LOCKING_ANDX_RANGE, max_num, GFP_KERNEL); + buf = kzalloc_objs(LOCKING_ANDX_RANGE, max_num); if (!buf) return -ENOMEM; diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 4810f926dccb..09fe749e97ee 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -1924,7 +1924,7 @@ int smb3_init_fs_context(struct fs_context *fc) char *nodename = utsname()->nodename; int i; - ctx = kzalloc_obj(struct smb3_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct smb3_fs_context); if (unlikely(!ctx)) return -ENOMEM; diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index d40f39f9547c..d4d3cfeb6c90 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -1841,7 +1841,7 @@ cifs_rename_pending_delete(const char *full_path, struct dentry *dentry, /* set ATTR_HIDDEN and clear ATTR_READONLY, but only if needed */ if (dosattr != origattr) { - info_buf = kzalloc_obj(*info_buf, GFP_KERNEL); + info_buf = kzalloc_obj(*info_buf); if (info_buf == NULL) { rc = -ENOMEM; goto out_close; @@ -2041,7 +2041,7 @@ psx_del_no_retry: } } } else if ((rc == -EACCES) && (dosattr == 0) && inode) { - attrs = kzalloc_obj(*attrs, GFP_KERNEL); + attrs = kzalloc_obj(*attrs); if (attrs == NULL) { rc = -ENOMEM; goto out_reval; @@ -2197,7 +2197,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode, struct inode *newinode = NULL; struct cifs_fattr fattr; - info = kzalloc_obj(FILE_UNIX_BASIC_INFO, GFP_KERNEL); + info = kzalloc_obj(FILE_UNIX_BASIC_INFO); if (info == NULL) { rc = -ENOMEM; goto posix_mkdir_out; @@ -2585,7 +2585,7 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, * with unix extensions enabled. */ info_buf_source = - kmalloc_objs(FILE_UNIX_BASIC_INFO, 2, GFP_KERNEL); + kmalloc_objs(FILE_UNIX_BASIC_INFO, 2); if (info_buf_source == NULL) { rc = -ENOMEM; goto cifs_rename_exit; @@ -3166,7 +3166,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) attrs->ia_valid &= ~ATTR_MODE; - args = kmalloc_obj(*args, GFP_KERNEL); + args = kmalloc_obj(*args); if (args == NULL) { rc = -ENOMEM; goto out; diff --git a/fs/smb/client/ioctl.c b/fs/smb/client/ioctl.c index 6d24184c8735..8dc2651e237f 100644 --- a/fs/smb/client/ioctl.c +++ b/fs/smb/client/ioctl.c @@ -133,7 +133,7 @@ static long smb_mnt_get_fsinfo(unsigned int xid, struct cifs_tcon *tcon, int rc = 0; struct smb_mnt_fs_info *fsinf; - fsinf = kzalloc_obj(struct smb_mnt_fs_info, GFP_KERNEL); + fsinf = kzalloc_obj(struct smb_mnt_fs_info); if (fsinf == NULL) return -ENOMEM; diff --git a/fs/smb/client/misc.c b/fs/smb/client/misc.c index 290d0a0bea53..aec6f2c52408 100644 --- a/fs/smb/client/misc.c +++ b/fs/smb/client/misc.c @@ -67,7 +67,7 @@ sesInfoAlloc(void) { struct cifs_ses *ret_buf; - ret_buf = kzalloc_obj(struct cifs_ses, GFP_KERNEL); + ret_buf = kzalloc_obj(struct cifs_ses); if (ret_buf) { atomic_inc(&sesInfoAllocCount); spin_lock_init(&ret_buf->ses_lock); @@ -118,7 +118,7 @@ tcon_info_alloc(bool dir_leases_enabled, enum smb3_tcon_ref_trace trace) struct cifs_tcon *ret_buf; static atomic_t tcon_debug_id; - ret_buf = kzalloc_obj(*ret_buf, GFP_KERNEL); + ret_buf = kzalloc_obj(*ret_buf); if (!ret_buf) return NULL; diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c index 53e17fb2b6ee..8615a8747b7f 100644 --- a/fs/smb/client/readdir.c +++ b/fs/smb/client/readdir.c @@ -358,7 +358,7 @@ _initiate_cifs_search(const unsigned int xid, struct file *file, if (IS_ERR(tlink)) return PTR_ERR(tlink); - cifsFile = kzalloc_obj(struct cifsFileInfo, GFP_KERNEL); + cifsFile = kzalloc_obj(struct cifsFileInfo); if (cifsFile == NULL) { rc = -ENOMEM; goto error_exit; diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c index e32f9e185499..698bd27119ae 100644 --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -510,7 +510,7 @@ cifs_ses_add_channel(struct cifs_ses *ses, * the session and server without caring about memory * management. */ - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) { rc = -ENOMEM; goto out_free_xid; diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c index 689e052c2809..aed49aaef8c4 100644 --- a/fs/smb/client/smb1ops.c +++ b/fs/smb/client/smb1ops.c @@ -506,7 +506,7 @@ cifs_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon, int rc; FILE_ALL_INFO *file_info; - file_info = kmalloc_obj(FILE_ALL_INFO, GFP_KERNEL); + file_info = kmalloc_obj(FILE_ALL_INFO); if (file_info == NULL) return -ENOMEM; diff --git a/fs/smb/client/smb1session.c b/fs/smb/client/smb1session.c index f5ef07d24b5f..83bfbf0c068e 100644 --- a/fs/smb/client/smb1session.c +++ b/fs/smb/client/smb1session.c @@ -725,7 +725,7 @@ sess_auth_rawntlmssp_negotiate(struct sess_data *sess_data) * if memory allocation is successful, caller of this function * frees it. */ - ses->ntlmssp = kmalloc_obj(struct ntlmssp_auth, GFP_KERNEL); + ses->ntlmssp = kmalloc_obj(struct ntlmssp_auth); if (!ses->ntlmssp) { rc = -ENOMEM; goto out; @@ -969,7 +969,7 @@ int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, return -EINVAL; } - sess_data = kzalloc_obj(struct sess_data, GFP_KERNEL); + sess_data = kzalloc_obj(struct sess_data); if (!sess_data) return -ENOMEM; diff --git a/fs/smb/client/smb2file.c b/fs/smb/client/smb2file.c index 6dba874156aa..1ab41de2b634 100644 --- a/fs/smb/client/smb2file.c +++ b/fs/smb/client/smb2file.c @@ -281,7 +281,7 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, BUILD_BUG_ON(sizeof(struct smb2_lock_element) > PAGE_SIZE); max_buf = min_t(unsigned int, max_buf, PAGE_SIZE); max_num = max_buf / sizeof(struct smb2_lock_element); - buf = kzalloc_objs(struct smb2_lock_element, max_num, GFP_KERNEL); + buf = kzalloc_objs(struct smb2_lock_element, max_num); if (!buf) return -ENOMEM; @@ -424,7 +424,7 @@ smb2_push_mandatory_locks(struct cifsFileInfo *cfile) BUILD_BUG_ON(sizeof(struct smb2_lock_element) > PAGE_SIZE); max_buf = min_t(unsigned int, max_buf, PAGE_SIZE); max_num = max_buf / sizeof(struct smb2_lock_element); - buf = kzalloc_objs(struct smb2_lock_element, max_num, GFP_KERNEL); + buf = kzalloc_objs(struct smb2_lock_element, max_num); if (!buf) { free_xid(xid); return -ENOMEM; diff --git a/fs/smb/client/smb2misc.c b/fs/smb/client/smb2misc.c index efba7cb9fb70..e19674d9b92b 100644 --- a/fs/smb/client/smb2misc.c +++ b/fs/smb/client/smb2misc.c @@ -526,7 +526,7 @@ smb2_queue_pending_open_break(struct tcon_link *tlink, __u8 *lease_key, { struct smb2_lease_break_work *lw; - lw = kmalloc_obj(struct smb2_lease_break_work, GFP_KERNEL); + lw = kmalloc_obj(struct smb2_lease_break_work); if (!lw) { cifs_put_tlink(tlink); return; @@ -798,7 +798,7 @@ __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, { struct close_cancelled_open *cancelled; - cancelled = kzalloc_obj(*cancelled, GFP_KERNEL); + cancelled = kzalloc_obj(*cancelled); if (!cancelled) return -ENOMEM; diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 071df7465a8b..1ba66e1f6ffa 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -731,7 +731,7 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf, spin_unlock(&ses->iface_lock); /* no match. insert the entry in the list */ - info = kmalloc_obj(struct cifs_server_iface, GFP_KERNEL); + info = kmalloc_obj(struct cifs_server_iface); if (!info) { rc = -ENOMEM; goto out; @@ -1201,7 +1201,7 @@ replay_again: ea = NULL; resp_buftype[0] = resp_buftype[1] = resp_buftype[2] = CIFS_NO_BUFFER; - vars = kzalloc_obj(*vars, GFP_KERNEL); + vars = kzalloc_obj(*vars); if (!vars) { rc = -ENOMEM; goto out_free_path; @@ -2849,7 +2849,7 @@ replay_again: flags |= CIFS_TRANSFORM_REQ; resp_buftype[0] = resp_buftype[1] = resp_buftype[2] = CIFS_NO_BUFFER; - vars = kzalloc_obj(*vars, GFP_KERNEL); + vars = kzalloc_obj(*vars); if (!vars) { rc = -ENOMEM; goto out_free_path; @@ -4220,7 +4220,7 @@ smb2_create_lease_buf(u8 *lease_key, u8 oplock, u8 *parent_lease_key, __le32 fla { struct create_lease *buf; - buf = kzalloc_obj(struct create_lease, GFP_KERNEL); + buf = kzalloc_obj(struct create_lease); if (!buf) return NULL; @@ -4246,7 +4246,7 @@ smb3_create_lease_buf(u8 *lease_key, u8 oplock, u8 *parent_lease_key, __le32 fla { struct create_lease_v2 *buf; - buf = kzalloc_obj(struct create_lease_v2, GFP_KERNEL); + buf = kzalloc_obj(struct create_lease_v2); if (!buf) return NULL; @@ -4930,7 +4930,7 @@ receive_encrypted_read(struct TCP_Server_Info *server, struct mid_q_entry **mid, int rc; struct smb2_decrypt_work *dw; - dw = kzalloc_obj(struct smb2_decrypt_work, GFP_KERNEL); + dw = kzalloc_obj(struct smb2_decrypt_work); if (!dw) return -ENOMEM; INIT_WORK(&dw->decrypt, smb2_decrypt_offload); diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index 0ebfdfebc5e9..ef655acf673d 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -1009,7 +1009,7 @@ create_posix_buf(umode_t mode) { struct create_posix *buf; - buf = kzalloc_obj(struct create_posix, GFP_KERNEL); + buf = kzalloc_obj(struct create_posix); if (!buf) return NULL; @@ -1785,7 +1785,7 @@ SMB2_sess_auth_rawntlmssp_negotiate(struct SMB2_sess_data *sess_data) * If memory allocation is successful, caller of this function * frees it. */ - ses->ntlmssp = kmalloc_obj(struct ntlmssp_auth, GFP_KERNEL); + ses->ntlmssp = kmalloc_obj(struct ntlmssp_auth); if (!ses->ntlmssp) { rc = -ENOMEM; goto out_err; @@ -1983,7 +1983,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, return smb_EIO(smb_eio_trace_null_pointers); } - sess_data = kzalloc_obj(struct SMB2_sess_data, GFP_KERNEL); + sess_data = kzalloc_obj(struct SMB2_sess_data); if (!sess_data) return -ENOMEM; @@ -2297,7 +2297,7 @@ create_durable_buf(void) { create_durable_req_t *buf; - buf = kzalloc_obj(create_durable_req_t, GFP_KERNEL); + buf = kzalloc_obj(create_durable_req_t); if (!buf) return NULL; @@ -2320,7 +2320,7 @@ create_reconnect_durable_buf(struct cifs_fid *fid) { create_durable_req_t *buf; - buf = kzalloc_obj(create_durable_req_t, GFP_KERNEL); + buf = kzalloc_obj(create_durable_req_t); if (!buf) return NULL; @@ -2492,7 +2492,7 @@ create_durable_v2_buf(struct cifs_open_parms *oparms) struct cifs_fid *pfid = oparms->fid; struct create_durable_req_v2 *buf; - buf = kzalloc_obj(struct create_durable_req_v2, GFP_KERNEL); + buf = kzalloc_obj(struct create_durable_req_v2); if (!buf) return NULL; @@ -2533,7 +2533,7 @@ create_reconnect_durable_v2_buf(struct cifs_fid *fid) { struct create_durable_handle_reconnect_v2 *buf; - buf = kzalloc_obj(struct create_durable_handle_reconnect_v2, GFP_KERNEL); + buf = kzalloc_obj(struct create_durable_handle_reconnect_v2); if (!buf) return NULL; @@ -2624,7 +2624,7 @@ create_twarp_buf(__u64 timewarp) { struct crt_twarp_ctxt *buf; - buf = kzalloc_obj(struct crt_twarp_ctxt, GFP_KERNEL); + buf = kzalloc_obj(struct crt_twarp_ctxt); if (!buf) return NULL; @@ -2791,7 +2791,7 @@ create_query_id_buf(void) { struct crt_query_id_ctxt *buf; - buf = kzalloc_obj(struct crt_query_id_ctxt, GFP_KERNEL); + buf = kzalloc_obj(struct crt_query_id_ctxt); if (!buf) return NULL; @@ -5843,7 +5843,7 @@ replay_again: if (smb3_encryption_required(tcon)) flags |= CIFS_TRANSFORM_REQ; - iov = kmalloc_objs(struct kvec, num, GFP_KERNEL); + iov = kmalloc_objs(struct kvec, num); if (!iov) return -ENOMEM; diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index e2df73c719fd..77f36d68621b 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -2098,7 +2098,7 @@ static struct smbd_connection *_smbd_get_connection( char wq_name[80]; struct workqueue_struct *workqueue; - info = kzalloc_obj(struct smbd_connection, GFP_KERNEL); + info = kzalloc_obj(struct smbd_connection); if (!info) return NULL; sc = &info->socket; @@ -2786,7 +2786,7 @@ static int allocate_mr_list(struct smbdirect_socket *sc) /* Allocate more MRs (2x) than hardware responder_resources */ for (i = 0; i < sp->responder_resources * 2; i++) { - mr = kzalloc_obj(*mr, GFP_KERNEL); + mr = kzalloc_obj(*mr); if (!mr) { ret = -ENOMEM; goto kzalloc_mr_failed; diff --git a/fs/splice.c b/fs/splice.c index cad3779fa35c..9d8f63e2fd1a 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -275,8 +275,8 @@ int splice_grow_spd(const struct pipe_inode_info *pipe, struct splice_pipe_desc if (max_usage <= PIPE_DEF_BUFFERS) return 0; - spd->pages = kmalloc_objs(struct page *, max_usage, GFP_KERNEL); - spd->partial = kmalloc_objs(struct partial_page, max_usage, GFP_KERNEL); + spd->pages = kmalloc_objs(struct page *, max_usage); + spd->partial = kmalloc_objs(struct partial_page, max_usage); if (spd->pages && spd->partial) return 0; @@ -675,7 +675,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, if (!out->f_op->write_iter) return -EINVAL; - array = kzalloc_objs(struct bio_vec, nbufs, GFP_KERNEL); + array = kzalloc_objs(struct bio_vec, nbufs); if (unlikely(!array)) return -ENOMEM; @@ -696,7 +696,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out, if (unlikely(nbufs < pipe->max_usage)) { kfree(array); nbufs = pipe->max_usage; - array = kzalloc_objs(struct bio_vec, nbufs, GFP_KERNEL); + array = kzalloc_objs(struct bio_vec, nbufs); if (!array) { ret = -ENOMEM; break; 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; diff --git a/fs/super.c b/fs/super.c index b8a6e156359d..378e81efe643 100644 --- a/fs/super.c +++ b/fs/super.c @@ -317,7 +317,7 @@ static void destroy_unused_super(struct super_block *s) static struct super_block *alloc_super(struct file_system_type *type, int flags, struct user_namespace *user_ns) { - struct super_block *s = kzalloc_obj(struct super_block, GFP_KERNEL); + struct super_block *s = kzalloc_obj(struct super_block); static const struct super_operations default_op; int i; diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index a6de7d945fba..e65c60158a04 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -62,7 +62,7 @@ static int sysfs_init_fs_context(struct fs_context *fc) return -EPERM; } - kfc = kzalloc_obj(struct kernfs_fs_context, GFP_KERNEL); + kfc = kzalloc_obj(struct kernfs_fs_context); if (!kfc) return -ENOMEM; diff --git a/fs/timerfd.c b/fs/timerfd.c index f379edab7c02..73104f36bcae 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -413,7 +413,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags) !capable(CAP_WAKE_ALARM)) return -EPERM; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 81a3a7dcf6ce..8e5ac464b328 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -439,7 +439,7 @@ static inline struct eventfs_inode *init_ei(struct eventfs_inode *ei, const char static inline struct eventfs_inode *alloc_ei(const char *name) { - struct eventfs_inode *ei = kzalloc_obj(*ei, GFP_KERNEL); + struct eventfs_inode *ei = kzalloc_obj(*ei); struct eventfs_inode *result; if (!ei) @@ -454,7 +454,7 @@ static inline struct eventfs_inode *alloc_ei(const char *name) static inline struct eventfs_inode *alloc_root_ei(const char *name) { - struct eventfs_root_inode *rei = kzalloc_obj(*rei, GFP_KERNEL); + struct eventfs_root_inode *rei = kzalloc_obj(*rei); struct eventfs_inode *ei; if (!rei) diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 780f38c1b52d..51c00c8fa175 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -522,7 +522,7 @@ static int tracefs_init_fs_context(struct fs_context *fc) { struct tracefs_fs_info *fsi; - fsi = kzalloc_obj(struct tracefs_fs_info, GFP_KERNEL); + fsi = kzalloc_obj(struct tracefs_fs_info); if (!fsi) return -ENOMEM; diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index cb24592753b0..160c16aa7b6e 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -3035,7 +3035,7 @@ void ubifs_assert_failed(struct ubifs_info *c, const char *expr, */ int ubifs_debugging_init(struct ubifs_info *c) { - c->dbg = kzalloc_obj(struct ubifs_debug_info, GFP_KERNEL); + c->dbg = kzalloc_obj(struct ubifs_debug_info); if (!c->dbg) return -ENOMEM; diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index 0e088aa661af..4c9f57f3b2ad 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1725,7 +1725,7 @@ static int ubifs_dir_open(struct inode *inode, struct file *file) { struct ubifs_dir_data *data; - data = kzalloc_obj(struct ubifs_dir_data, GFP_KERNEL); + data = kzalloc_obj(struct ubifs_dir_data); if (!data) return -ENOMEM; file->private_data = data; diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index a9cb92e3ee9c..b3986705cfa0 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c @@ -624,9 +624,9 @@ int ubifs_create_dflt_lpt(struct ubifs_info *c, int *main_lebs, int lpt_first, if (IS_ERR(desc)) return PTR_ERR(desc); - lsave = kmalloc_objs(int, c->lsave_cnt, GFP_KERNEL); - pnode = kzalloc_obj(struct ubifs_pnode, GFP_KERNEL); - nnode = kzalloc_obj(struct ubifs_nnode, GFP_KERNEL); + lsave = kmalloc_objs(int, c->lsave_cnt); + pnode = kzalloc_obj(struct ubifs_pnode); + nnode = kzalloc_obj(struct ubifs_nnode); buf = vmalloc(c->leb_size); ltab = vmalloc_array(c->lpt_lebs, sizeof(struct ubifs_lpt_lprops)); diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index d92aed9fbad7..5c9dbf0a0806 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -1258,7 +1258,7 @@ static int add_ino(struct ubifs_info *c, ino_t inum, loff_t i_size, p = &(*p)->rb_right; } - e = kzalloc_obj(struct size_entry, GFP_KERNEL); + e = kzalloc_obj(struct size_entry); if (!e) return -ENOMEM; diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 7e5435dab283..a9a568f4a868 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -393,7 +393,7 @@ static int insert_node(struct ubifs_info *c, int lnum, int offs, int len, if (key_inum(c, key) >= c->highest_inum) c->highest_inum = key_inum(c, key); - r = kzalloc_obj(struct replay_entry, GFP_KERNEL); + r = kzalloc_obj(struct replay_entry); if (!r) return -ENOMEM; @@ -443,7 +443,7 @@ static int insert_dent(struct ubifs_info *c, int lnum, int offs, int len, if (key_inum(c, key) >= c->highest_inum) c->highest_inum = key_inum(c, key); - r = kzalloc_obj(struct replay_entry, GFP_KERNEL); + r = kzalloc_obj(struct replay_entry); if (!r) return -ENOMEM; @@ -897,11 +897,11 @@ static int add_replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead, dbg_mnt("add replay bud LEB %d:%d, head %d", lnum, offs, jhead); - bud = kmalloc_obj(struct ubifs_bud, GFP_KERNEL); + bud = kmalloc_obj(struct ubifs_bud); if (!bud) return -ENOMEM; - b = kmalloc_obj(struct bud_entry, GFP_KERNEL); + b = kmalloc_obj(struct bud_entry); if (!b) { err = -ENOMEM; goto out; diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index b86b65fcd615..03bf924756ca 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -819,7 +819,7 @@ static int alloc_wbufs(struct ubifs_info *c) { int i, err; - c->jheads = kzalloc_objs(struct ubifs_jhead, c->jhead_cnt, GFP_KERNEL); + c->jheads = kzalloc_objs(struct ubifs_jhead, c->jhead_cnt); if (!c->jheads) return -ENOMEM; @@ -1245,7 +1245,7 @@ static int mount_ubifs(struct ubifs_info *c) * never exceed 64. */ err = -ENOMEM; - c->bottom_up_buf = kmalloc_objs(int, BOTTOM_UP_HEIGHT, GFP_KERNEL); + c->bottom_up_buf = kmalloc_objs(int, BOTTOM_UP_HEIGHT); if (!c->bottom_up_buf) goto out_free; @@ -2081,7 +2081,7 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi) { struct ubifs_info *c; - c = kzalloc_obj(struct ubifs_info, GFP_KERNEL); + c = kzalloc_obj(struct ubifs_info); if (c) { spin_lock_init(&c->cnt_lock); spin_lock_init(&c->cs_lock); @@ -2334,7 +2334,7 @@ static int ubifs_init_fs_context(struct fs_context *fc) { struct ubifs_fs_context *ctx; - ctx = kzalloc_obj(struct ubifs_fs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct ubifs_fs_context); if (!ctx) return -ENOMEM; diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c index 1c926e865be3..dbf967dcf26e 100644 --- a/fs/ubifs/sysfs.c +++ b/fs/ubifs/sysfs.c @@ -93,7 +93,7 @@ int ubifs_sysfs_register(struct ubifs_info *c) int ret, n; char dfs_dir_name[UBIFS_DFS_DIR_LEN]; - c->stats = kzalloc_obj(struct ubifs_stats_info, GFP_KERNEL); + c->stats = kzalloc_obj(struct ubifs_stats_info); if (!c->stats) { ret = -ENOMEM; goto out_last; diff --git a/fs/udf/super.c b/fs/udf/super.c index 365cb78097d3..e4220ce08742 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -270,7 +270,7 @@ static int udf_init_fs_context(struct fs_context *fc) { struct udf_options *uopt; - uopt = kzalloc_obj(*uopt, GFP_KERNEL); + uopt = kzalloc_obj(*uopt); if (!uopt) return -ENOMEM; @@ -320,7 +320,7 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count) { struct udf_sb_info *sbi = UDF_SB(sb); - sbi->s_partmaps = kzalloc_objs(*sbi->s_partmaps, count, GFP_KERNEL); + sbi->s_partmaps = kzalloc_objs(*sbi->s_partmaps, count); if (!sbi->s_partmaps) { sbi->s_partitions = 0; return -ENOMEM; @@ -1696,7 +1696,7 @@ static struct udf_vds_record *handle_partition_descriptor( struct part_desc_seq_scan_data *new_loc; unsigned int new_size = ALIGN(partnum, PART_DESC_ALLOC_STEP); - new_loc = kzalloc_objs(*new_loc, new_size, GFP_KERNEL); + new_loc = kzalloc_objs(*new_loc, new_size); if (!new_loc) return ERR_PTR(-ENOMEM); memcpy(new_loc, data->part_descs_loc, @@ -2156,7 +2156,7 @@ static int udf_fill_super(struct super_block *sb, struct fs_context *fc) bool lvid_open = false; int silent = fc->sb_flags & SB_SILENT; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 2937221f7942..c4831a8b9b3f 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -743,7 +743,7 @@ static int ufs_fill_super(struct super_block *sb, struct fs_context *fc) } #endif - sbi = kzalloc_obj(struct ufs_sb_info, GFP_KERNEL); + sbi = kzalloc_obj(struct ufs_sb_info); if (!sbi) goto failed_nomem; sb->s_fs_info = sbi; @@ -768,7 +768,7 @@ static int ufs_fill_super(struct super_block *sb, struct fs_context *fc) sbi->s_flavour = UFS_MOUNT_UFSTYPE_OLD; } - uspi = kzalloc_obj(struct ufs_sb_private_info, GFP_KERNEL); + uspi = kzalloc_obj(struct ufs_sb_private_info); sbi->s_uspi = uspi; if (!uspi) goto failed; @@ -1437,7 +1437,7 @@ static int ufs_init_fs_context(struct fs_context *fc) { struct ufs_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 3755b8067ad3..543c60c12461 100644 --- a/fs/unicode/utf8-core.c +++ b/fs/unicode/utf8-core.c @@ -176,7 +176,7 @@ struct unicode_map *utf8_load(unsigned int version) { struct unicode_map *um; - um = kzalloc_obj(struct unicode_map, GFP_KERNEL); + um = kzalloc_obj(struct unicode_map); if (!um) return ERR_PTR(-ENOMEM); um->version = version; diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index e90c4a762917..bdc84e5219cd 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -653,7 +653,7 @@ int dup_userfaultfd(struct vm_area_struct *vma, struct list_head *fcs) } if (!ctx) { - fctx = kmalloc_obj(*fctx, GFP_KERNEL); + fctx = kmalloc_obj(*fctx); if (!fctx) return -ENOMEM; @@ -840,7 +840,7 @@ int userfaultfd_unmap_prep(struct vm_area_struct *vma, unsigned long start, has_unmap_ctx(ctx, unmaps, start, end)) return 0; - unmap_ctx = kzalloc_obj(*unmap_ctx, GFP_KERNEL); + unmap_ctx = kzalloc_obj(*unmap_ctx); if (!unmap_ctx) return -ENOMEM; diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c index 174ede512d30..7a7a3fbb2651 100644 --- a/fs/vboxsf/file.c +++ b/fs/vboxsf/file.c @@ -26,7 +26,7 @@ struct vboxsf_handle *vboxsf_create_sf_handle(struct inode *inode, struct vboxsf_inode *sf_i = VBOXSF_I(inode); struct vboxsf_handle *sf_handle; - sf_handle = kmalloc_obj(*sf_handle, GFP_KERNEL); + sf_handle = kmalloc_obj(*sf_handle); if (!sf_handle) return ERR_PTR(-ENOMEM); diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c index fe048ab05c48..a618cb093e00 100644 --- a/fs/vboxsf/super.c +++ b/fs/vboxsf/super.c @@ -122,7 +122,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) if (!fc->source) return -EINVAL; - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; @@ -427,7 +427,7 @@ static int vboxsf_init_fs_context(struct fs_context *fc) { struct vboxsf_fs_context *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/fs/vboxsf/utils.c b/fs/vboxsf/utils.c index b95c1e42d073..440e8c50629d 100644 --- a/fs/vboxsf/utils.c +++ b/fs/vboxsf/utils.c @@ -478,7 +478,7 @@ static struct vboxsf_dir_buf *vboxsf_dir_buf_alloc(struct list_head *list) { struct vboxsf_dir_buf *b; - b = kmalloc_obj(*b, GFP_KERNEL); + b = kmalloc_obj(*b); if (!b) return NULL; @@ -507,7 +507,7 @@ struct vboxsf_dir_info *vboxsf_dir_info_alloc(void) { struct vboxsf_dir_info *p; - p = kmalloc_obj(*p, GFP_KERNEL); + p = kmalloc_obj(*p); if (!p) return NULL; diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c index 759da639d386..9c6765cc2d44 100644 --- a/fs/xfs/libxfs/xfs_ag.c +++ b/fs/xfs/libxfs/xfs_ag.c @@ -224,7 +224,7 @@ xfs_perag_alloc( struct xfs_perag *pag; int error; - pag = kzalloc_obj(*pag, GFP_KERNEL); + pag = kzalloc_obj(*pag); if (!pag) return -ENOMEM; diff --git a/fs/xfs/libxfs/xfs_rtgroup.c b/fs/xfs/libxfs/xfs_rtgroup.c index 3b7f4819b85b..c85d50953218 100644 --- a/fs/xfs/libxfs/xfs_rtgroup.c +++ b/fs/xfs/libxfs/xfs_rtgroup.c @@ -98,7 +98,7 @@ xfs_rtgroup_alloc( struct xfs_rtgroup *rtg; int error; - rtg = kzalloc_obj(struct xfs_rtgroup, GFP_KERNEL); + rtg = kzalloc_obj(struct xfs_rtgroup); if (!rtg) return -ENOMEM; diff --git a/fs/xfs/scrub/stats.c b/fs/xfs/scrub/stats.c index 8cd018bac5d6..ef3f6abdb706 100644 --- a/fs/xfs/scrub/stats.c +++ b/fs/xfs/scrub/stats.c @@ -389,7 +389,7 @@ xchk_mount_stats_alloc( struct xchk_stats *cs; int error; - cs = kvzalloc_obj(struct xchk_stats, GFP_KERNEL); + cs = kvzalloc_obj(struct xchk_stats); if (!cs) return -ENOMEM; diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c index 5f391372f188..02b95b89d1b5 100644 --- a/fs/xfs/xfs_buf_item_recover.c +++ b/fs/xfs/xfs_buf_item_recover.c @@ -1180,7 +1180,7 @@ xlog_alloc_buf_cancel_table( ASSERT(log->l_buf_cancel_table == NULL); - p = kmalloc_objs(struct list_head, XLOG_BC_TABLE_SIZE, GFP_KERNEL); + p = kmalloc_objs(struct list_head, XLOG_BC_TABLE_SIZE); if (!p) return -ENOMEM; diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c index 3ecbb4e0f2c8..906221ffe9ba 100644 --- a/fs/xfs/xfs_discard.c +++ b/fs/xfs/xfs_discard.c @@ -349,7 +349,7 @@ xfs_trim_perag_extents( do { struct xfs_busy_extents *extents; - extents = kzalloc_obj(*extents, GFP_KERNEL); + extents = kzalloc_obj(*extents); if (!extents) { error = -ENOMEM; break; @@ -537,7 +537,7 @@ xfs_trim_gather_rtextent( return 0; } - busyp = kzalloc_obj(struct xfs_rtx_busy, GFP_KERNEL); + busyp = kzalloc_obj(struct xfs_rtx_busy); if (!busyp) return -ENOMEM; @@ -689,7 +689,7 @@ xfs_trim_rtgroup_extents( * trims the extents returned. */ do { - tr.extents = kzalloc_obj(*tr.extents, GFP_KERNEL); + tr.extents = kzalloc_obj(*tr.extents); if (!tr.extents) { error = -ENOMEM; break; diff --git a/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c index a5f02cac9d31..3efdca3d675b 100644 --- a/fs/xfs/xfs_extent_busy.c +++ b/fs/xfs/xfs_extent_busy.c @@ -717,7 +717,7 @@ xfs_extent_busy_alloc(void) { struct xfs_extent_busy_tree *eb; - eb = kzalloc_obj(*eb, GFP_KERNEL); + eb = kzalloc_obj(*eb); if (!eb) return NULL; spin_lock_init(&eb->eb_lock); diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index 3724e64898f3..b6a3bc9f143c 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -1326,11 +1326,11 @@ xfs_ioc_getfsmap( */ count = min_t(unsigned int, head.fmh_count, 131072 / sizeof(struct fsmap)); - recs = kvzalloc_objs(struct fsmap, count, GFP_KERNEL); + recs = kvzalloc_objs(struct fsmap, count); if (!recs) { count = min_t(unsigned int, head.fmh_count, PAGE_SIZE / sizeof(struct fsmap)); - recs = kvzalloc_objs(struct fsmap, count, GFP_KERNEL); + recs = kvzalloc_objs(struct fsmap, count); if (!recs) return -ENOMEM; } diff --git a/fs/xfs/xfs_healthmon.c b/fs/xfs/xfs_healthmon.c index 757a4213b2d0..e37c18cec372 100644 --- a/fs/xfs/xfs_healthmon.c +++ b/fs/xfs/xfs_healthmon.c @@ -1187,7 +1187,7 @@ xfs_ioc_health_monitor( if (!xfs_healthmon_validate(&hmo)) return -EINVAL; - hm = kzalloc_obj(*hm, GFP_KERNEL); + hm = kzalloc_obj(*hm); if (!hm) return -ENOMEM; hm->dev = mp->m_super->s_dev; diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 1074e36fa240..facffdc8dca8 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -896,7 +896,7 @@ xfs_ioc_getbmap( if (bmx.bmv_count >= INT_MAX / recsize) return -ENOMEM; - buf = kvzalloc_objs(*buf, bmx.bmv_count, GFP_KERNEL); + buf = kvzalloc_objs(*buf, bmx.bmv_count); if (!buf) return -ENOMEM; diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 0ce953b45852..011525a2cbc8 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -2235,7 +2235,7 @@ xfs_init_fs_context( struct xfs_mount *mp; int i; - mp = kzalloc_obj(struct xfs_mount, GFP_KERNEL); + mp = kzalloc_obj(struct xfs_mount); if (!mp) return -ENOMEM; #ifdef DEBUG diff --git a/fs/xfs/xfs_zone_alloc.c b/fs/xfs/xfs_zone_alloc.c index 5d45d88f1f03..67e0c8f5800f 100644 --- a/fs/xfs/xfs_zone_alloc.c +++ b/fs/xfs/xfs_zone_alloc.c @@ -1196,7 +1196,7 @@ xfs_alloc_zone_info( struct xfs_zone_info *zi; int i; - zi = kzalloc_obj(*zi, GFP_KERNEL); + zi = kzalloc_obj(*zi); if (!zi) return NULL; INIT_LIST_HEAD(&zi->zi_open_zones); diff --git a/fs/xfs/xfs_zone_gc.c b/fs/xfs/xfs_zone_gc.c index b8b9c72e955a..8604c8a2d86b 100644 --- a/fs/xfs/xfs_zone_gc.c +++ b/fs/xfs/xfs_zone_gc.c @@ -199,7 +199,7 @@ xfs_zone_gc_data_alloc( struct xfs_zone_gc_data *data; int i; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return NULL; data->iter.recs = kzalloc_objs(*data->iter.recs, XFS_ZONE_GC_RECS, diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 28be57db6e4b..9b7676553751 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -1243,7 +1243,7 @@ static int zonefs_fill_super(struct super_block *sb, struct fs_context *fc) * ZONEFS_F_AGGRCNV which increases the maximum file size of a file * beyond the zone size is taken into account. */ - sbi = kzalloc_obj(*sbi, GFP_KERNEL); + sbi = kzalloc_obj(*sbi); if (!sbi) return -ENOMEM; @@ -1388,7 +1388,7 @@ static int zonefs_init_fs_context(struct fs_context *fc) { struct zonefs_context *ctx; - ctx = kzalloc_obj(struct zonefs_context, GFP_KERNEL); + ctx = kzalloc_obj(struct zonefs_context); if (!ctx) return -ENOMEM; ctx->s_mount_opts = ZONEFS_MNTOPT_ERRORS_RO; |
