Lines Matching refs:crypt_info
540 struct fscrypt_info *crypt_info; in fscrypt_setup_encryption_info() local
549 crypt_info = kmem_cache_zalloc(fscrypt_info_cachep, GFP_KERNEL); in fscrypt_setup_encryption_info()
550 if (!crypt_info) in fscrypt_setup_encryption_info()
553 crypt_info->ci_inode = inode; in fscrypt_setup_encryption_info()
554 crypt_info->ci_policy = *policy; in fscrypt_setup_encryption_info()
555 memcpy(crypt_info->ci_nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_setup_encryption_info()
557 mode = select_encryption_mode(&crypt_info->ci_policy, inode); in fscrypt_setup_encryption_info()
563 crypt_info->ci_mode = mode; in fscrypt_setup_encryption_info()
565 res = setup_file_encryption_key(crypt_info, need_dirhash_key, in fscrypt_setup_encryption_info()
576 if (cmpxchg_release(&inode->i_crypt_info, NULL, crypt_info) == NULL) { in fscrypt_setup_encryption_info()
586 crypt_info->ci_master_key = key_get(master_key); in fscrypt_setup_encryption_info()
588 list_add(&crypt_info->ci_master_key_link, in fscrypt_setup_encryption_info()
592 crypt_info = NULL; in fscrypt_setup_encryption_info()
600 put_crypt_info(crypt_info); in fscrypt_setup_encryption_info()