Lines Matching refs:crypt_info
280 struct fscrypt_info *crypt_info; in fscrypt_get_encryption_info() local
315 crypt_info = kmem_cache_alloc(fscrypt_info_cachep, GFP_NOFS); in fscrypt_get_encryption_info()
316 if (!crypt_info) in fscrypt_get_encryption_info()
319 crypt_info->ci_flags = ctx.flags; in fscrypt_get_encryption_info()
320 crypt_info->ci_data_mode = ctx.contents_encryption_mode; in fscrypt_get_encryption_info()
321 crypt_info->ci_filename_mode = ctx.filenames_encryption_mode; in fscrypt_get_encryption_info()
322 crypt_info->ci_ctfm = NULL; in fscrypt_get_encryption_info()
323 crypt_info->ci_essiv_tfm = NULL; in fscrypt_get_encryption_info()
324 memcpy(crypt_info->ci_master_key, ctx.master_key_descriptor, in fscrypt_get_encryption_info()
325 sizeof(crypt_info->ci_master_key)); in fscrypt_get_encryption_info()
327 mode = select_encryption_mode(crypt_info, inode); in fscrypt_get_encryption_info()
367 crypt_info->ci_ctfm = ctfm; in fscrypt_get_encryption_info()
374 crypt_info->ci_data_mode == FS_ENCRYPTION_MODE_AES_128_CBC) { in fscrypt_get_encryption_info()
375 res = init_essiv_generator(crypt_info, raw_key, mode->keysize); in fscrypt_get_encryption_info()
383 if (cmpxchg(&inode->i_crypt_info, NULL, crypt_info) == NULL) in fscrypt_get_encryption_info()
384 crypt_info = NULL; in fscrypt_get_encryption_info()
388 put_crypt_info(crypt_info); in fscrypt_get_encryption_info()