diff options
Diffstat (limited to 'fs/ecryptfs/crypto.c')
| -rw-r--r-- | fs/ecryptfs/crypto.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 2bf52033538b..ff981503b3e3 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
| @@ -1590,8 +1590,8 @@ int ecryptfs_read_and_validate_xattr_region(struct dentry *dentry, | |||
| 1590 | */ | 1590 | */ |
| 1591 | int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) | 1591 | int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) |
| 1592 | { | 1592 | { |
| 1593 | int rc = 0; | 1593 | int rc; |
| 1594 | char *page_virt = NULL; | 1594 | char *page_virt; |
| 1595 | struct inode *ecryptfs_inode = ecryptfs_dentry->d_inode; | 1595 | struct inode *ecryptfs_inode = ecryptfs_dentry->d_inode; |
| 1596 | struct ecryptfs_crypt_stat *crypt_stat = | 1596 | struct ecryptfs_crypt_stat *crypt_stat = |
| 1597 | &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; | 1597 | &ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat; |
| @@ -1616,6 +1616,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) | |||
| 1616 | ecryptfs_dentry, | 1616 | ecryptfs_dentry, |
| 1617 | ECRYPTFS_VALIDATE_HEADER_SIZE); | 1617 | ECRYPTFS_VALIDATE_HEADER_SIZE); |
| 1618 | if (rc) { | 1618 | if (rc) { |
| 1619 | /* metadata is not in the file header, so try xattrs */ | ||
| 1619 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 1620 | memset(page_virt, 0, PAGE_CACHE_SIZE); |
| 1620 | rc = ecryptfs_read_xattr_region(page_virt, ecryptfs_inode); | 1621 | rc = ecryptfs_read_xattr_region(page_virt, ecryptfs_inode); |
| 1621 | if (rc) { | 1622 | if (rc) { |
