diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 131954b3fb98..abac91c58bfb 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -392,7 +392,8 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
392 | dentry->d_sb)->mount_crypt_stat; | 392 | dentry->d_sb)->mount_crypt_stat; |
393 | if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) { | 393 | if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) { |
394 | if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) | 394 | if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) |
395 | file_size = (crypt_stat->header_extent_size | 395 | file_size = ((crypt_stat->extent_size |
396 | * crypt_stat->num_header_extents_at_front) | ||
396 | + i_size_read(lower_dentry->d_inode)); | 397 | + i_size_read(lower_dentry->d_inode)); |
397 | else | 398 | else |
398 | file_size = i_size_read(lower_dentry->d_inode); | 399 | file_size = i_size_read(lower_dentry->d_inode); |
@@ -722,8 +723,8 @@ upper_size_to_lower_size(struct ecryptfs_crypt_stat *crypt_stat, | |||
722 | { | 723 | { |
723 | loff_t lower_size; | 724 | loff_t lower_size; |
724 | 725 | ||
725 | lower_size = ( crypt_stat->header_extent_size | 726 | lower_size = (crypt_stat->extent_size |
726 | * crypt_stat->num_header_extents_at_front ); | 727 | * crypt_stat->num_header_extents_at_front); |
727 | if (upper_size != 0) { | 728 | if (upper_size != 0) { |
728 | loff_t num_extents; | 729 | loff_t num_extents; |
729 | 730 | ||