Whamcloud - gitweb
LU-8066 libcfs: call kernel_param_unlock on error
[fs/lustre-release.git] / libcfs / libcfs / debug.c
index 02af6fa..999eec4 100644 (file)
@@ -73,6 +73,10 @@ static int libcfs_param_debug_mb_set(const char *val,
 #endif
        if (!*((unsigned int *)kp->arg)) {
                *((unsigned int *)kp->arg) = num;
+
+#if !defined(HAVE_MODULE_PARAM_LOCKING) && !defined(HAVE_KERNEL_PARAM_LOCK)
+               kernel_param_unlock(THIS_MODULE);
+#endif
                return 0;
        }