git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DISABLE -> BUILTIN : CONFIG_CRAMFS
[linux-2.6.git]
/
fs
/
nfsctl.c
diff --git
a/fs/nfsctl.c
b/fs/nfsctl.c
index
aaf9f56
..
c043136
100644
(file)
--- a/
fs/nfsctl.c
+++ b/
fs/nfsctl.c
@@
-4,7
+4,7
@@
* This should eventually move to userland.
*
*/
* This should eventually move to userland.
*
*/
-#include <linux/
config
.h>
+#include <linux/
types
.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/sunrpc/svc.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/sunrpc/svc.h>
@@
-13,6
+13,7
@@
#include <linux/linkage.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/linkage.h>
#include <linux/namei.h>
#include <linux/mount.h>
+#include <linux/syscalls.h>
#include <asm/uaccess.h>
/*
#include <asm/uaccess.h>
/*
@@
-96,12
+97,10
@@
asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r
if (copy_from_user(&version, &arg->ca_version, sizeof(int)))
return -EFAULT;
if (copy_from_user(&version, &arg->ca_version, sizeof(int)))
return -EFAULT;
- if (version != NFSCTL_VERSION) {
- printk(KERN_WARNING "nfsd: incompatible version in syscall.\n");
+ if (version != NFSCTL_VERSION)
return -EINVAL;
return -EINVAL;
- }
- if (cmd < 0 || cmd >=
sizeof(map)/sizeof(map[0]
) || !map[cmd].name)
+ if (cmd < 0 || cmd >=
ARRAY_SIZE(map
) || !map[cmd].name)
return -EINVAL;
file = do_open(map[cmd].name, map[cmd].rsize ? O_RDWR : O_WRONLY);
return -EINVAL;
file = do_open(map[cmd].name, map[cmd].rsize ? O_RDWR : O_WRONLY);