diff options
author | Eric Biggers <ebiggers@google.com> | 2021-01-21 00:21:54 -0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-02-01 11:56:18 +0100 |
commit | 5851d3b042b694839d2241fbb3200ce958135cdf (patch) | |
tree | c399d0eeeca923f0e72458fa24d929f3fd751edd /drivers/scsi | |
parent | 4af307f574260cb1b768be84c81ce572da7a84ea (diff) |
block/keyslot-manager: introduce devm_blk_ksm_init()
Add a resource-managed variant of blk_ksm_init() so that drivers don't
have to worry about calling blk_ksm_destroy().
Note that the implementation uses a custom devres action to call
blk_ksm_destroy() rather than switching the two allocations to be
directly devres-managed, e.g. with devm_kmalloc(). This is because we
need to keep zeroing the memory containing the keyslots when it is
freed, and also because we want to continue using kvmalloc() (and there
is no devm_kvmalloc()).
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Satya Tangirala <satyat@google.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20210121082155.111333-2-ebiggers@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions