Lines Matching refs:crypt_stat

213 	struct ecryptfs_crypt_stat *crypt_stat =  in ecryptfs_initialize_file()  local
214 &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; in ecryptfs_initialize_file()
219 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_initialize_file()
285 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_i_size_read() local
297 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_i_size_read()
299 if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) in ecryptfs_i_size_read()
300 ecryptfs_set_default_sizes(crypt_stat); in ecryptfs_i_size_read()
307 crypt_stat->flags |= ECRYPTFS_METADATA_IN_XATTR; in ecryptfs_i_size_read()
691 upper_size_to_lower_size(struct ecryptfs_crypt_stat *crypt_stat, in upper_size_to_lower_size() argument
696 lower_size = ecryptfs_lower_header_size(crypt_stat); in upper_size_to_lower_size()
700 num_extents = upper_size >> crypt_stat->extent_shift; in upper_size_to_lower_size()
701 if (upper_size & ~crypt_stat->extent_mask) in upper_size_to_lower_size()
703 lower_size += (num_extents * crypt_stat->extent_size); in upper_size_to_lower_size()
729 struct ecryptfs_crypt_stat *crypt_stat; in truncate_upper() local
741 crypt_stat = &ecryptfs_inode_to_private(d_inode(dentry))->crypt_stat; in truncate_upper()
761 if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) { in truncate_upper()
796 upper_size_to_lower_size(crypt_stat, i_size); in truncate_upper()
798 upper_size_to_lower_size(crypt_stat, ia->ia_size); in truncate_upper()
812 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_inode_newsize_ok() local
815 crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; in ecryptfs_inode_newsize_ok()
816 lower_oldsize = upper_size_to_lower_size(crypt_stat, in ecryptfs_inode_newsize_ok()
818 lower_newsize = upper_size_to_lower_size(crypt_stat, offset); in ecryptfs_inode_newsize_ok()
893 struct ecryptfs_crypt_stat *crypt_stat; in ecryptfs_setattr() local
895 crypt_stat = &ecryptfs_inode_to_private(d_inode(dentry))->crypt_stat; in ecryptfs_setattr()
896 if (!(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) { in ecryptfs_setattr()
897 rc = ecryptfs_init_crypt_stat(crypt_stat); in ecryptfs_setattr()
904 mutex_lock(&crypt_stat->cs_mutex); in ecryptfs_setattr()
906 crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); in ecryptfs_setattr()
908 && (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) in ecryptfs_setattr()
909 || !(crypt_stat->flags & ECRYPTFS_KEY_VALID))) { in ecryptfs_setattr()
916 mutex_unlock(&crypt_stat->cs_mutex); in ecryptfs_setattr()
930 mutex_unlock(&crypt_stat->cs_mutex); in ecryptfs_setattr()
934 crypt_stat->flags &= ~(ECRYPTFS_I_SIZE_INITIALIZED in ecryptfs_setattr()
938 mutex_unlock(&crypt_stat->cs_mutex); in ecryptfs_setattr()