Lines Matching defs:mode_num
619 int blk_crypto_fallback_start_using_mode(enum blk_crypto_mode_num mode_num)
621 const char *cipher_str = blk_crypto_modes[mode_num].cipher_str;
628 * Ensure that updates to blk_crypto_keyslots[i].tfms[mode_num]
631 if (likely(smp_load_acquire(&tfms_inited[mode_num])))
635 if (tfms_inited[mode_num])
644 slotp->tfms[mode_num] = crypto_alloc_sync_skcipher(cipher_str,
646 if (IS_ERR(slotp->tfms[mode_num])) {
647 err = PTR_ERR(slotp->tfms[mode_num]);
653 slotp->tfms[mode_num] = NULL;
657 crypto_sync_skcipher_set_flags(slotp->tfms[mode_num],
662 * Ensure that updates to blk_crypto_keyslots[i].tfms[mode_num]
663 * for each i are visible before we set tfms_inited[mode_num].
665 smp_store_release(&tfms_inited[mode_num], true);
671 crypto_free_sync_skcipher(slotp->tfms[mode_num]);
672 slotp->tfms[mode_num] = NULL;