Lines Matching refs:devs

27 	struct block_device **devs;  in fscrypt_get_devices()  local
30 devs = sb->s_cop->get_devices(sb, num_devs); in fscrypt_get_devices()
31 if (devs) in fscrypt_get_devices()
32 return devs; in fscrypt_get_devices()
34 devs = kmalloc(sizeof(*devs), GFP_KERNEL); in fscrypt_get_devices()
35 if (!devs) in fscrypt_get_devices()
37 devs[0] = sb->s_bdev; in fscrypt_get_devices()
39 return devs; in fscrypt_get_devices()
72 struct block_device **devs, in fscrypt_log_blk_crypto_impl() argument
80 blk_crypto_config_supported_natively(devs[i], cfg)) { in fscrypt_log_blk_crypto_impl()
97 struct block_device **devs; in fscrypt_select_encryption_impl() local
135 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_select_encryption_impl()
136 if (IS_ERR(devs)) in fscrypt_select_encryption_impl()
137 return PTR_ERR(devs); in fscrypt_select_encryption_impl()
140 if (!blk_crypto_config_supported(devs[i], &crypto_cfg)) in fscrypt_select_encryption_impl()
144 fscrypt_log_blk_crypto_impl(ci->ci_mode, devs, num_devs, &crypto_cfg); in fscrypt_select_encryption_impl()
148 kfree(devs); in fscrypt_select_encryption_impl()
161 struct block_device **devs; in fscrypt_prepare_inline_crypt_key() local
180 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_prepare_inline_crypt_key()
181 if (IS_ERR(devs)) { in fscrypt_prepare_inline_crypt_key()
182 err = PTR_ERR(devs); in fscrypt_prepare_inline_crypt_key()
186 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
190 kfree(devs); in fscrypt_prepare_inline_crypt_key()
214 struct block_device **devs; in fscrypt_destroy_inline_crypt_key() local
222 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_destroy_inline_crypt_key()
223 if (!IS_ERR(devs)) { in fscrypt_destroy_inline_crypt_key()
225 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
226 kfree(devs); in fscrypt_destroy_inline_crypt_key()