JFS: Remove redundant xattr permission checking
[pandora-kernel.git] / fs / nfsctl.c
index 0d4cf94..c043136 100644 (file)
@@ -4,7 +4,6 @@
  *     This should eventually move to userland.
  *
  */
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/file.h>
 #include <linux/fs.h>
@@ -98,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);