diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 83e94fedd4e9..0a50942b4378 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -282,7 +282,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
282 | struct dentry *lower_dentry; | 282 | struct dentry *lower_dentry; |
283 | struct vfsmount *lower_mnt; | 283 | struct vfsmount *lower_mnt; |
284 | char *encoded_name; | 284 | char *encoded_name; |
285 | unsigned int encoded_namelen; | 285 | int encoded_namelen; |
286 | struct ecryptfs_crypt_stat *crypt_stat = NULL; | 286 | struct ecryptfs_crypt_stat *crypt_stat = NULL; |
287 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 287 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |
288 | char *page_virt = NULL; | 288 | char *page_virt = NULL; |
@@ -473,7 +473,7 @@ static int ecryptfs_symlink(struct inode *dir, struct dentry *dentry, | |||
473 | struct dentry *lower_dir_dentry; | 473 | struct dentry *lower_dir_dentry; |
474 | umode_t mode; | 474 | umode_t mode; |
475 | char *encoded_symname; | 475 | char *encoded_symname; |
476 | unsigned int encoded_symlen; | 476 | int encoded_symlen; |
477 | struct ecryptfs_crypt_stat *crypt_stat = NULL; | 477 | struct ecryptfs_crypt_stat *crypt_stat = NULL; |
478 | 478 | ||
479 | lower_dentry = ecryptfs_dentry_to_lower(dentry); | 479 | lower_dentry = ecryptfs_dentry_to_lower(dentry); |
@@ -902,8 +902,9 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia) | |||
902 | mutex_lock(&crypt_stat->cs_mutex); | 902 | mutex_lock(&crypt_stat->cs_mutex); |
903 | if (S_ISDIR(dentry->d_inode->i_mode)) | 903 | if (S_ISDIR(dentry->d_inode->i_mode)) |
904 | crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); | 904 | crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); |
905 | else if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) | 905 | else if (S_ISREG(dentry->d_inode->i_mode) |
906 | || !(crypt_stat->flags & ECRYPTFS_KEY_VALID)) { | 906 | && (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) |
907 | || !(crypt_stat->flags & ECRYPTFS_KEY_VALID))) { | ||
907 | struct vfsmount *lower_mnt; | 908 | struct vfsmount *lower_mnt; |
908 | struct file *lower_file = NULL; | 909 | struct file *lower_file = NULL; |
909 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 910 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |