- int rc;
- unsigned *interval = (unsigned *)kp->arg;
- unsigned long value;
-
- rc = kstrtoul(val, 0, &value);
- if (rc) {
- CERROR("Invalid module parameter value for 'lnet_recovery_interval'\n");
- return rc;
- }
-
- if (value < 1) {
- CERROR("lnet_recovery_interval must be at least 1 second\n");
- return -EINVAL;
- }
-
- /*
- * The purpose of locking the api_mutex here is to ensure that
- * the correct value ends up stored properly.
- */
- mutex_lock(&the_lnet.ln_api_mutex);
-
- *interval = value;
-
- mutex_unlock(&the_lnet.ln_api_mutex);