fscrypt: stop holding extra request_queue references
authorEric Biggers <ebiggers@google.com>
Thu, 1 Sep 2022 19:32:07 +0000 (12:32 -0700)
committerEric Biggers <ebiggers@google.com>
Thu, 22 Sep 2022 03:33:06 +0000 (20:33 -0700)
commit22e9947a4b2ba255888541bd0111cf00b9b16586
tree3eeb3e78d55ade9dd42dcc2900c25c9329f09f0c
parentd7e7b9af104c7b389a0c21eb26532511bce4b510
fscrypt: stop holding extra request_queue references

Now that the fscrypt_master_key lifetime has been reworked to not be
subject to the quirks of the keyrings subsystem, blk_crypto_evict_key()
no longer gets called after the filesystem has already been unmounted.
Therefore, there is no longer any need to hold extra references to the
filesystem's request_queue(s).  (And these references didn't always do
their intended job anyway, as pinning a request_queue doesn't
necessarily pin the corresponding blk_crypto_profile.)

Stop taking these extra references.  Instead, just pass the super_block
to fscrypt_destroy_inline_crypt_key(), and use it to get the list of
block devices the key needs to be evicted from.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20220901193208.138056-3-ebiggers@kernel.org
fs/crypto/fscrypt_private.h
fs/crypto/inline_crypt.c
fs/crypto/keyring.c
fs/crypto/keysetup.c
fs/crypto/keysetup_v1.c