summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/bio-integrity.c2
-rw-r--r--block/bio.c2
-rw-r--r--block/blk-cgroup.c2
-rw-r--r--block/blk-crypto-profile.c2
-rw-r--r--block/blk-crypto-sysfs.c2
-rw-r--r--block/blk-iocost.c2
-rw-r--r--block/blk-iolatency.c2
-rw-r--r--block/blk-mq-sched.c2
-rw-r--r--block/blk-mq.c4
-rw-r--r--block/blk-stat.c6
-rw-r--r--block/blk-wbt.c2
-rw-r--r--block/bsg-lib.c2
-rw-r--r--block/bsg.c2
-rw-r--r--block/disk-events.c2
-rw-r--r--block/fops.c2
-rw-r--r--block/genhd.c4
-rw-r--r--block/holder.c2
-rw-r--r--block/partitions/aix.c2
-rw-r--r--block/partitions/cmdline.c4
-rw-r--r--block/partitions/core.c2
-rw-r--r--block/partitions/efi.c2
-rw-r--r--block/partitions/ibm.c6
-rw-r--r--block/partitions/ldm.c10
-rw-r--r--block/sed-opal.c4
24 files changed, 36 insertions, 36 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index dc2e771f11ae..20f5d301d32d 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -322,7 +322,7 @@ int bio_integrity_map_user(struct bio *bio, struct iov_iter *iter)
if (nr_vecs > BIO_MAX_VECS)
return -E2BIG;
if (nr_vecs > UIO_FASTIOV) {
- bvec = kzalloc_objs(*bvec, nr_vecs, GFP_KERNEL);
+ bvec = kzalloc_objs(*bvec, nr_vecs);
if (!bvec)
return -ENOMEM;
pages = NULL;
diff --git a/block/bio.c b/block/bio.c
index c8e14c330a35..d80d5d26804e 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -84,7 +84,7 @@ static DEFINE_XARRAY(bio_slabs);
static struct bio_slab *create_bio_slab(unsigned int size)
{
- struct bio_slab *bslab = kzalloc_obj(*bslab, GFP_KERNEL);
+ struct bio_slab *bslab = kzalloc_obj(*bslab);
if (!bslab)
return NULL;
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index de609a3e0228..b70096497d38 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1417,7 +1417,7 @@ blkcg_css_alloc(struct cgroup_subsys_state *parent_css)
if (!parent_css) {
blkcg = &blkcg_root;
} else {
- blkcg = kzalloc_obj(*blkcg, GFP_KERNEL);
+ blkcg = kzalloc_obj(*blkcg);
if (!blkcg)
goto unlock;
}
diff --git a/block/blk-crypto-profile.c b/block/blk-crypto-profile.c
index 58032fd7faff..970880d9adf4 100644
--- a/block/blk-crypto-profile.c
+++ b/block/blk-crypto-profile.c
@@ -93,7 +93,7 @@ int blk_crypto_profile_init(struct blk_crypto_profile *profile,
/* Initialize keyslot management data. */
- profile->slots = kvzalloc_objs(profile->slots[0], num_slots, GFP_KERNEL);
+ profile->slots = kvzalloc_objs(profile->slots[0], num_slots);
if (!profile->slots)
goto err_destroy;
diff --git a/block/blk-crypto-sysfs.c b/block/blk-crypto-sysfs.c
index e6c76d672829..ea7a0b85a46f 100644
--- a/block/blk-crypto-sysfs.c
+++ b/block/blk-crypto-sysfs.c
@@ -170,7 +170,7 @@ int blk_crypto_sysfs_register(struct gendisk *disk)
if (!q->crypto_profile)
return 0;
- obj = kzalloc_obj(*obj, GFP_KERNEL);
+ obj = kzalloc_obj(*obj);
if (!obj)
return -ENOMEM;
obj->profile = q->crypto_profile;
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 32faf0a56bd3..d145db61e5c3 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2882,7 +2882,7 @@ static int blk_iocost_init(struct gendisk *disk)
struct ioc *ioc;
int i, cpu, ret;
- ioc = kzalloc_obj(*ioc, GFP_KERNEL);
+ ioc = kzalloc_obj(*ioc);
if (!ioc)
return -ENOMEM;
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
index 609a71476bff..53e8dd2dfa8a 100644
--- a/block/blk-iolatency.c
+++ b/block/blk-iolatency.c
@@ -760,7 +760,7 @@ static int blk_iolatency_init(struct gendisk *disk)
struct blk_iolatency *blkiolat;
int ret;
- blkiolat = kzalloc_obj(*blkiolat, GFP_KERNEL);
+ blkiolat = kzalloc_obj(*blkiolat);
if (!blkiolat)
return -ENOMEM;
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 0d085a53f0d7..0a00f5a76f5a 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -489,7 +489,7 @@ int blk_mq_alloc_sched_ctx_batch(struct xarray *elv_tbl,
lockdep_assert_held_write(&set->update_nr_hwq_lock);
list_for_each_entry(q, &set->tag_list, tag_set_list) {
- ctx = kzalloc_obj(struct elv_change_ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(struct elv_change_ctx);
if (!ctx)
return -ENOMEM;
diff --git a/block/blk-mq.c b/block/blk-mq.c
index e0bbe087766f..9af8c3dec3f6 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4362,7 +4362,7 @@ static int blk_mq_alloc_ctxs(struct request_queue *q)
struct blk_mq_ctxs *ctxs;
int cpu;
- ctxs = kzalloc_obj(*ctxs, GFP_KERNEL);
+ ctxs = kzalloc_obj(*ctxs);
if (!ctxs)
return -ENOMEM;
@@ -4879,7 +4879,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
set->nr_hw_queues = nr_cpu_ids;
if (set->flags & BLK_MQ_F_BLOCKING) {
- set->srcu = kmalloc_obj(*set->srcu, GFP_KERNEL);
+ set->srcu = kmalloc_obj(*set->srcu);
if (!set->srcu)
return -ENOMEM;
ret = init_srcu_struct(set->srcu);
diff --git a/block/blk-stat.c b/block/blk-stat.c
index 2eaa5e27cdb8..de126e1ea5ac 100644
--- a/block/blk-stat.c
+++ b/block/blk-stat.c
@@ -103,11 +103,11 @@ blk_stat_alloc_callback(void (*timer_fn)(struct blk_stat_callback *),
{
struct blk_stat_callback *cb;
- cb = kmalloc_obj(*cb, GFP_KERNEL);
+ cb = kmalloc_obj(*cb);
if (!cb)
return NULL;
- cb->stat = kmalloc_objs(struct blk_rq_stat, buckets, GFP_KERNEL);
+ cb->stat = kmalloc_objs(struct blk_rq_stat, buckets);
if (!cb->stat) {
kfree(cb);
return NULL;
@@ -206,7 +206,7 @@ struct blk_queue_stats *blk_alloc_queue_stats(void)
{
struct blk_queue_stats *stats;
- stats = kmalloc_obj(*stats, GFP_KERNEL);
+ stats = kmalloc_obj(*stats);
if (!stats)
return NULL;
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 91115508179b..33006edfccd4 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -713,7 +713,7 @@ static int wbt_data_dir(const struct request *rq)
static struct rq_wb *wbt_alloc(void)
{
- struct rq_wb *rwb = kzalloc_obj(*rwb, GFP_KERNEL);
+ struct rq_wb *rwb = kzalloc_obj(*rwb);
if (!rwb)
return NULL;
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index ca08c6b7fb9c..20cd0ef3c394 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -368,7 +368,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
struct request_queue *q;
int ret = -ENOMEM;
- bset = kzalloc_obj(*bset, GFP_KERNEL);
+ bset = kzalloc_obj(*bset);
if (!bset)
return ERR_PTR(-ENOMEM);
diff --git a/block/bsg.c b/block/bsg.c
index 5f87ea8d5f64..e0af6206ed28 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -192,7 +192,7 @@ struct bsg_device *bsg_register_queue(struct request_queue *q,
struct bsg_device *bd;
int ret;
- bd = kzalloc_obj(*bd, GFP_KERNEL);
+ bd = kzalloc_obj(*bd);
if (!bd)
return ERR_PTR(-ENOMEM);
bd->max_queue = BSG_DEFAULT_CMDS;
diff --git a/block/disk-events.c b/block/disk-events.c
index 04d44d05ed53..9f9f9f8a2d6b 100644
--- a/block/disk-events.c
+++ b/block/disk-events.c
@@ -436,7 +436,7 @@ int disk_alloc_events(struct gendisk *disk)
if (!disk->fops->check_events || !disk->events)
return 0;
- ev = kzalloc_obj(*ev, GFP_KERNEL);
+ ev = kzalloc_obj(*ev);
if (!ev) {
pr_warn("%s: failed to initialize events\n", disk->disk_name);
return -ENOMEM;
diff --git a/block/fops.c b/block/fops.c
index 57a53e0d1016..bb6642b45937 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -65,7 +65,7 @@ static ssize_t __blkdev_direct_IO_simple(struct kiocb *iocb,
if (nr_pages <= DIO_INLINE_BIO_VECS)
vecs = inline_vecs;
else {
- vecs = kmalloc_objs(struct bio_vec, nr_pages, GFP_KERNEL);
+ vecs = kmalloc_objs(struct bio_vec, nr_pages);
if (!vecs)
return -ENOMEM;
}
diff --git a/block/genhd.c b/block/genhd.c
index 15866ccf5c33..7d6854fd28e9 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -264,7 +264,7 @@ int __register_blkdev(unsigned int major, const char *name,
goto out;
}
- p = kmalloc_obj(struct blk_major_name, GFP_KERNEL);
+ p = kmalloc_obj(struct blk_major_name);
if (p == NULL) {
ret = -ENOMEM;
goto out;
@@ -914,7 +914,7 @@ static void *disk_seqf_start(struct seq_file *seqf, loff_t *pos)
struct class_dev_iter *iter;
struct device *dev;
- iter = kmalloc_obj(*iter, GFP_KERNEL);
+ iter = kmalloc_obj(*iter);
if (!iter)
return ERR_PTR(-ENOMEM);
diff --git a/block/holder.c b/block/holder.c
index 1e7b88815323..267beb3dc7a7 100644
--- a/block/holder.c
+++ b/block/holder.c
@@ -92,7 +92,7 @@ int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk)
goto out_unlock;
}
- holder = kzalloc_obj(*holder, GFP_KERNEL);
+ holder = kzalloc_obj(*holder);
if (!holder) {
ret = -ENOMEM;
goto out_unlock;
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index 97c8fa2a866f..a886cefbefbb 100644
--- a/block/partitions/aix.c
+++ b/block/partitions/aix.c
@@ -199,7 +199,7 @@ int aix_partition(struct parsed_partitions *state)
numlvs = be16_to_cpu(p->numlvs);
put_dev_sector(sect);
}
- lvip = kzalloc_objs(struct lv_info, state->limit, GFP_KERNEL);
+ lvip = kzalloc_objs(struct lv_info, state->limit);
if (!lvip)
return 0;
if (numlvs && (d = read_part_sector(state, vgda_sector + 1, &sect))) {
diff --git a/block/partitions/cmdline.c b/block/partitions/cmdline.c
index 5d604a64842e..a2b1870c3fd4 100644
--- a/block/partitions/cmdline.c
+++ b/block/partitions/cmdline.c
@@ -46,7 +46,7 @@ static int parse_subpart(struct cmdline_subpart **subpart, char *partdef)
*subpart = NULL;
- new_subpart = kzalloc_obj(struct cmdline_subpart, GFP_KERNEL);
+ new_subpart = kzalloc_obj(struct cmdline_subpart);
if (!new_subpart)
return -ENOMEM;
@@ -122,7 +122,7 @@ static int parse_parts(struct cmdline_parts **parts, char *bdevdef)
*parts = NULL;
- newparts = kzalloc_obj(struct cmdline_parts, GFP_KERNEL);
+ newparts = kzalloc_obj(struct cmdline_parts);
if (!newparts)
return -ENOMEM;
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 189ab5650351..740228750aaf 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -94,7 +94,7 @@ static struct parsed_partitions *allocate_partitions(struct gendisk *hd)
struct parsed_partitions *state;
int nr = DISK_MAX_PARTS;
- state = kzalloc_obj(*state, GFP_KERNEL);
+ state = kzalloc_obj(*state);
if (!state)
return NULL;
diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index ff145c6306e0..75474fb3848e 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -595,7 +595,7 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
lastlba = last_lba(state->disk);
if (!force_gpt) {
/* This will be added to the EFI Spec. per Intel after v1.02. */
- legacymbr = kzalloc_obj(*legacymbr, GFP_KERNEL);
+ legacymbr = kzalloc_obj(*legacymbr);
if (!legacymbr)
goto fail;
diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c
index b81b7a690787..9311ad5fb95d 100644
--- a/block/partitions/ibm.c
+++ b/block/partitions/ibm.c
@@ -347,13 +347,13 @@ int ibm_partition(struct parsed_partitions *state)
nr_sectors = bdev_nr_sectors(bdev);
if (nr_sectors == 0)
goto out_symbol;
- info = kmalloc_obj(dasd_information2_t, GFP_KERNEL);
+ info = kmalloc_obj(dasd_information2_t);
if (info == NULL)
goto out_symbol;
- geo = kmalloc_obj(struct hd_geometry, GFP_KERNEL);
+ geo = kmalloc_obj(struct hd_geometry);
if (geo == NULL)
goto out_nogeo;
- label = kmalloc_obj(union label_t, GFP_KERNEL);
+ label = kmalloc_obj(union label_t);
if (label == NULL)
goto out_nolab;
/* set start if not filled by getgeo function e.g. virtblk */
diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index 27ffddd74e11..776b4ad95091 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -273,8 +273,8 @@ static bool ldm_validate_privheads(struct parsed_partitions *state,
BUG_ON (!state || !ph1);
- ph[1] = kmalloc_obj(*ph[1], GFP_KERNEL);
- ph[2] = kmalloc_obj(*ph[2], GFP_KERNEL);
+ ph[1] = kmalloc_obj(*ph[1]);
+ ph[2] = kmalloc_obj(*ph[2]);
if (!ph[1] || !ph[2]) {
ldm_crit ("Out of memory.");
goto out;
@@ -362,7 +362,7 @@ static bool ldm_validate_tocblocks(struct parsed_partitions *state,
BUG_ON(!state || !ldb);
ph = &ldb->ph;
tb[0] = &ldb->toc;
- tb[1] = kmalloc_objs(*tb[1], 3, GFP_KERNEL);
+ tb[1] = kmalloc_objs(*tb[1], 3);
if (!tb[1]) {
ldm_crit("Out of memory.");
goto err;
@@ -1158,7 +1158,7 @@ static bool ldm_ldmdb_add (u8 *data, int len, struct ldmdb *ldb)
BUG_ON (!data || !ldb);
- vb = kmalloc_obj(*vb, GFP_KERNEL);
+ vb = kmalloc_obj(*vb);
if (!vb) {
ldm_crit ("Out of memory.");
return false;
@@ -1438,7 +1438,7 @@ int ldm_partition(struct parsed_partitions *state)
if (!ldm_validate_partition_table(state))
return 0;
- ldb = kmalloc_obj(*ldb, GFP_KERNEL);
+ ldb = kmalloc_obj(*ldb);
if (!ldb) {
ldm_crit ("Out of memory.");
goto out;
diff --git a/block/sed-opal.c b/block/sed-opal.c
index fbe0fe4dce8a..3ded1ca723ca 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -2512,7 +2512,7 @@ struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv)
{
struct opal_dev *dev;
- dev = kmalloc_obj(*dev, GFP_KERNEL);
+ dev = kmalloc_obj(*dev);
if (!dev)
return NULL;
@@ -2719,7 +2719,7 @@ static int opal_save(struct opal_dev *dev, struct opal_lock_unlock *lk_unlk)
{
struct opal_suspend_data *suspend;
- suspend = kzalloc_obj(*suspend, GFP_KERNEL);
+ suspend = kzalloc_obj(*suspend);
if (!suspend)
return -ENOMEM;