diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-06-05 11:26:33 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-06-05 16:47:43 +0200 |
commit | d377535405686f735b90a8ad4ba269484cd7c96e (patch) | |
tree | 75c1e73537f2821874bdb1c49f84e65d6abcd958 /drivers/md/dm-bio-prison-v1.c | |
parent | blk-mq: return when hctx is stopped in blk_mq_run_work_fn (diff) | |
download | linux-d377535405686f735b90a8ad4ba269484cd7c96e.tar.xz linux-d377535405686f735b90a8ad4ba269484cd7c96e.zip |
dm: Use kzalloc for all structs with embedded biosets/mempools
mempool_init()/bioset_init() require that the mempools/biosets be zeroed
first; they probably should not _require_ this, but not allocating those
structs with kzalloc is a fairly nonsensical thing to do (calling
mempool_exit()/bioset_exit() on an uninitialized mempool/bioset is legal
and safe, but only works if said memory was zeroed.)
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-bio-prison-v1.c')
-rw-r--r-- | drivers/md/dm-bio-prison-v1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-bio-prison-v1.c b/drivers/md/dm-bio-prison-v1.c index 8e33a3808368..e794e3662fdd 100644 --- a/drivers/md/dm-bio-prison-v1.c +++ b/drivers/md/dm-bio-prison-v1.c @@ -33,7 +33,7 @@ static struct kmem_cache *_cell_cache; */ struct dm_bio_prison *dm_bio_prison_create(void) { - struct dm_bio_prison *prison = kmalloc(sizeof(*prison), GFP_KERNEL); + struct dm_bio_prison *prison = kzalloc(sizeof(*prison), GFP_KERNEL); int ret; if (!prison) |