diff options
Diffstat (limited to 'fs/nfsctl.c')
-rw-r--r-- | fs/nfsctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsctl.c b/fs/nfsctl.c index b1acbd6ab6fb..8f9a20556f79 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c | |||
@@ -38,9 +38,10 @@ static struct file *do_open(char *name, int flags) | |||
38 | return ERR_PTR(error); | 38 | return ERR_PTR(error); |
39 | 39 | ||
40 | if (flags == O_RDWR) | 40 | if (flags == O_RDWR) |
41 | error = may_open(&nd,MAY_READ|MAY_WRITE,FMODE_READ|FMODE_WRITE); | 41 | error = may_open(&nd.path, MAY_READ|MAY_WRITE, |
42 | FMODE_READ|FMODE_WRITE); | ||
42 | else | 43 | else |
43 | error = may_open(&nd, MAY_WRITE, FMODE_WRITE); | 44 | error = may_open(&nd.path, MAY_WRITE, FMODE_WRITE); |
44 | 45 | ||
45 | if (!error) | 46 | if (!error) |
46 | return dentry_open(nd.path.dentry, nd.path.mnt, flags, | 47 | return dentry_open(nd.path.dentry, nd.path.mnt, flags, |
@@ -85,8 +86,8 @@ static struct { | |||
85 | }, | 86 | }, |
86 | }; | 87 | }; |
87 | 88 | ||
88 | long | 89 | SYSCALL_DEFINE3(nfsservctl, int, cmd, struct nfsctl_arg __user *, arg, |
89 | asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *res) | 90 | void __user *, res) |
90 | { | 91 | { |
91 | struct file *file; | 92 | struct file *file; |
92 | void __user *p = &arg->u; | 93 | void __user *p = &arg->u; |