aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsctl.c')
-rw-r--r--fs/nfsctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsctl.c b/fs/nfsctl.c
index 1c72c7f85ddc..a5a18d4aca40 100644
--- a/fs/nfsctl.c
+++ b/fs/nfsctl.c
@@ -101,7 +101,7 @@ asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r
101 if (version != NFSCTL_VERSION) 101 if (version != NFSCTL_VERSION)
102 return -EINVAL; 102 return -EINVAL;
103 103
104 if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name) 104 if (cmd < 0 || cmd >= ARRAY_SIZE(map) || !map[cmd].name)
105 return -EINVAL; 105 return -EINVAL;
106 106
107 file = do_open(map[cmd].name, map[cmd].rsize ? O_RDWR : O_WRONLY); 107 file = do_open(map[cmd].name, map[cmd].rsize ? O_RDWR : O_WRONLY);