diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 34b36a504059..b08b5187f662 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -907,9 +907,9 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia) | |||
907 | lower_inode = ecryptfs_inode_to_lower(inode); | 907 | lower_inode = ecryptfs_inode_to_lower(inode); |
908 | lower_dentry = ecryptfs_dentry_to_lower(dentry); | 908 | lower_dentry = ecryptfs_dentry_to_lower(dentry); |
909 | mutex_lock(&crypt_stat->cs_mutex); | 909 | mutex_lock(&crypt_stat->cs_mutex); |
910 | if (S_ISDIR(dentry->d_inode->i_mode)) | 910 | if (d_is_dir(dentry)) |
911 | crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); | 911 | crypt_stat->flags &= ~(ECRYPTFS_ENCRYPTED); |
912 | else if (S_ISREG(dentry->d_inode->i_mode) | 912 | else if (d_is_reg(dentry) |
913 | && (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) | 913 | && (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED) |
914 | || !(crypt_stat->flags & ECRYPTFS_KEY_VALID))) { | 914 | || !(crypt_stat->flags & ECRYPTFS_KEY_VALID))) { |
915 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 915 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |