Lines Matching defs:mode_num
621 int blk_crypto_fallback_start_using_mode(enum blk_crypto_mode_num mode_num)
623 const char *cipher_str = blk_crypto_modes[mode_num].cipher_str;
630 * Ensure that updates to blk_crypto_keyslots[i].tfms[mode_num]
633 if (likely(smp_load_acquire(&tfms_inited[mode_num])))
637 if (tfms_inited[mode_num])
646 slotp->tfms[mode_num] = crypto_alloc_skcipher(cipher_str, 0, 0);
647 if (IS_ERR(slotp->tfms[mode_num])) {
648 err = PTR_ERR(slotp->tfms[mode_num]);
654 slotp->tfms[mode_num] = NULL;
658 crypto_skcipher_set_flags(slotp->tfms[mode_num],
663 * Ensure that updates to blk_crypto_keyslots[i].tfms[mode_num]
664 * for each i are visible before we set tfms_inited[mode_num].
666 smp_store_release(&tfms_inited[mode_num], true);
672 crypto_free_skcipher(slotp->tfms[mode_num]);
673 slotp->tfms[mode_num] = NULL;