]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
dm: Use kzalloc for all structs with embedded biosets/mempools
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 5 Jun 2018 09:26:33 +0000 (05:26 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 14:47:43 +0000 (08:47 -0600)
commitd377535405686f735b90a8ad4ba269484cd7c96e
tree75c1e73537f2821874bdb1c49f84e65d6abcd958
parent0196d6b4088f43519576dc4b58ce28b6722dde3a
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>
drivers/md/dm-bio-prison-v1.c
drivers/md/dm-bio-prison-v2.c
drivers/md/dm-io.c
drivers/md/dm-kcopyd.c
drivers/md/dm-region-hash.c
drivers/md/dm-snap.c
drivers/md/dm-thin.c