diff options
author | Eric Biggers <ebiggers@google.com> | 2021-01-21 11:21:54 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-02-01 13:56:18 +0300 |
commit | 5851d3b042b694839d2241fbb3200ce958135cdf (patch) | |
tree | c399d0eeeca923f0e72458fa24d929f3fd751edd /drivers | |
parent | 4af307f574260cb1b768be84c81ce572da7a84ea (diff) | |
download | linux-5851d3b042b694839d2241fbb3200ce958135cdf.tar.xz |
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')
0 files changed, 0 insertions, 0 deletions