summaryrefslogtreecommitdiff
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
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);