diff options
Diffstat (limited to 'fs/nfsctl.c')
-rw-r--r-- | fs/nfsctl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsctl.c b/fs/nfsctl.c index d3854d94b7cf..bf9cbd242ddd 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c | |||
@@ -36,10 +36,9 @@ static struct file *do_open(char *name, int flags) | |||
36 | return ERR_PTR(error); | 36 | return ERR_PTR(error); |
37 | 37 | ||
38 | if (flags == O_RDWR) | 38 | if (flags == O_RDWR) |
39 | error = may_open(&nd.path, MAY_READ|MAY_WRITE, | 39 | error = may_open(&nd.path, MAY_READ|MAY_WRITE, flags); |
40 | FMODE_READ|FMODE_WRITE); | ||
41 | else | 40 | else |
42 | error = may_open(&nd.path, MAY_WRITE, FMODE_WRITE); | 41 | error = may_open(&nd.path, MAY_WRITE, flags); |
43 | 42 | ||
44 | if (!error) | 43 | if (!error) |
45 | return dentry_open(nd.path.dentry, nd.path.mnt, flags, | 44 | return dentry_open(nd.path.dentry, nd.path.mnt, flags, |