Lines Matching refs:devs
28 struct block_device **devs; in fscrypt_get_devices() local
31 devs = sb->s_cop->get_devices(sb, num_devs); in fscrypt_get_devices()
32 if (devs) in fscrypt_get_devices()
33 return devs; in fscrypt_get_devices()
35 devs = kmalloc(sizeof(*devs), GFP_KERNEL); in fscrypt_get_devices()
36 if (!devs) in fscrypt_get_devices()
38 devs[0] = sb->s_bdev; in fscrypt_get_devices()
40 return devs; in fscrypt_get_devices()
73 struct block_device **devs, in fscrypt_log_blk_crypto_impl() argument
81 blk_crypto_config_supported_natively(devs[i], cfg)) { in fscrypt_log_blk_crypto_impl()
99 struct block_device **devs; in fscrypt_select_encryption_impl() local
138 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_select_encryption_impl()
139 if (IS_ERR(devs)) in fscrypt_select_encryption_impl()
140 return PTR_ERR(devs); in fscrypt_select_encryption_impl()
143 if (!blk_crypto_config_supported(devs[i], &crypto_cfg)) in fscrypt_select_encryption_impl()
147 fscrypt_log_blk_crypto_impl(ci->ci_mode, devs, num_devs, &crypto_cfg); in fscrypt_select_encryption_impl()
151 kfree(devs); in fscrypt_select_encryption_impl()
167 struct block_device **devs; in fscrypt_prepare_inline_crypt_key() local
185 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_prepare_inline_crypt_key()
186 if (IS_ERR(devs)) { in fscrypt_prepare_inline_crypt_key()
187 err = PTR_ERR(devs); in fscrypt_prepare_inline_crypt_key()
191 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
195 kfree(devs); in fscrypt_prepare_inline_crypt_key()
219 struct block_device **devs; in fscrypt_destroy_inline_crypt_key() local
227 devs = fscrypt_get_devices(sb, &num_devs); in fscrypt_destroy_inline_crypt_key()
228 if (!IS_ERR(devs)) { in fscrypt_destroy_inline_crypt_key()
230 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
231 kfree(devs); in fscrypt_destroy_inline_crypt_key()