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, crypto_mode, in fscrypt_prepare_inline_crypt_key()
184 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
200 smp_store_release(&prep_key->blk_key, blk_key); in fscrypt_prepare_inline_crypt_key()
204 kfree_sensitive(blk_key); in fscrypt_prepare_inline_crypt_key()
211 struct blk_crypto_key *blk_key = prep_key->blk_key; in fscrypt_destroy_inline_crypt_key() local
216 if (!blk_key) in fscrypt_destroy_inline_crypt_key()
223 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
226 kfree_sensitive(blk_key); in fscrypt_destroy_inline_crypt_key()
276 bio_crypt_set_ctx(bio, ci->ci_enc_key.blk_key, dun, gfp_mask); in fscrypt_set_bio_crypt_ctx()
363 if (bc->bc_key != inode->i_crypt_info->ci_enc_key.blk_key) in fscrypt_mergeable_bio()