aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/kthread.c
diff options
context:
space:
mode:
authorMark Brown <[email protected]>2012-07-22 18:32:00 +0000
committerMark Brown <[email protected]>2012-07-22 18:32:00 +0000
commit3384fb98845dc014770caa224d61a2effd258ca5 (patch)
tree8189134a4938632e2d06e93af04c9fc1f3c2d4c9 /fs/ecryptfs/kthread.c
parentMerge branches 'regulator-core', 'regulator-dt' and 'regulator-dummy' into re... (diff)
parentregulator: add new lp8788 regulator driver (diff)
downloadkernel-3384fb98845dc014770caa224d61a2effd258ca5.tar.gz
kernel-3384fb98845dc014770caa224d61a2effd258ca5.zip
Merge branch 'regulator-drivers' into regulator-next
Diffstat (limited to 'fs/ecryptfs/kthread.c')
-rw-r--r--fs/ecryptfs/kthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
index 69f994a7d524..0dbe58a8b172 100644
--- a/fs/ecryptfs/kthread.c
+++ b/fs/ecryptfs/kthread.c
@@ -149,7 +149,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
(*lower_file) = dentry_open(lower_dentry, lower_mnt, flags, cred);
if (!IS_ERR(*lower_file))
goto out;
- if (flags & O_RDONLY) {
+ if ((flags & O_ACCMODE) == O_RDONLY) {
rc = PTR_ERR((*lower_file));
goto out;
}