]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfsctl.c
ocfs2: move nlink check in ocfs2_mknod()
[karo-tx-linux.git] / fs / nfsctl.c
index 0b14938b5b627ceac85590762fb50ec68f1c872f..c043136a82caa862d9b72d7196047765490064a0 100644 (file)
@@ -4,7 +4,7 @@
  *     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>
@@ -97,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 (version != NFSCTL_VERSION) {
-               printk(KERN_WARNING "nfsd: incompatible version in syscall.\n");
+       if (version != NFSCTL_VERSION)
                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);