Lines Matching refs:blk_key
160 struct blk_crypto_key *blk_key; in fscrypt_prepare_inline_crypt_key() local
166 blk_key = kmalloc(sizeof(*blk_key), GFP_KERNEL); in fscrypt_prepare_inline_crypt_key()
167 if (!blk_key) in fscrypt_prepare_inline_crypt_key()
170 err = blk_crypto_init_key(blk_key, raw_key, ci->ci_mode->keysize, in fscrypt_prepare_inline_crypt_key()
186 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
202 smp_store_release(&prep_key->blk_key, blk_key); in fscrypt_prepare_inline_crypt_key()
206 kfree_sensitive(blk_key); in fscrypt_prepare_inline_crypt_key()
213 struct blk_crypto_key *blk_key = prep_key->blk_key; in fscrypt_destroy_inline_crypt_key() local
218 if (!blk_key) in fscrypt_destroy_inline_crypt_key()
225 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
228 kfree_sensitive(blk_key); in fscrypt_destroy_inline_crypt_key()
280 bio_crypt_set_ctx(bio, ci->ci_enc_key.blk_key, dun, gfp_mask); in fscrypt_set_bio_crypt_ctx()
367 if (bc->bc_key != inode->i_crypt_info->ci_enc_key.blk_key) in fscrypt_mergeable_bio()