lockd: fix arg parsing for grace_period and timeout.
[firefly-linux-kernel-4.4.55.git] / fs / lockd / svc.c
index abfff9d7979dc60b57646b6129cdb7dd279c6041..1743064cd0cee5930e7c284ccade5a5771255736 100644 (file)
@@ -440,7 +440,7 @@ static int param_set_##name(const char *val, struct kernel_param *kp)       \
        __typeof__(type) num = which_strtol(val, &endp, 0);             \
        if (endp == val || *endp || num < (min) || num > (max))         \
                return -EINVAL;                                         \
-       *((int *) kp->arg) = num;                                       \
+       *((type *) kp->arg) = num;                                      \
        return 0;                                                       \
 }