diff options
Diffstat (limited to 'fs/ecryptfs/kthread.c')
-rw-r--r-- | fs/ecryptfs/kthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c index 69f994a7d52..0dbe58a8b17 100644 --- a/fs/ecryptfs/kthread.c +++ b/fs/ecryptfs/kthread.c | |||
@@ -149,7 +149,7 @@ int ecryptfs_privileged_open(struct file **lower_file, | |||
149 | (*lower_file) = dentry_open(lower_dentry, lower_mnt, flags, cred); | 149 | (*lower_file) = dentry_open(lower_dentry, lower_mnt, flags, cred); |
150 | if (!IS_ERR(*lower_file)) | 150 | if (!IS_ERR(*lower_file)) |
151 | goto out; | 151 | goto out; |
152 | if (flags & O_RDONLY) { | 152 | if ((flags & O_ACCMODE) == O_RDONLY) { |
153 | rc = PTR_ERR((*lower_file)); | 153 | rc = PTR_ERR((*lower_file)); |
154 | goto out; | 154 | goto out; |
155 | } | 155 | } |