string: factorize skip_spaces and export it to be generally available
[safe/jmp/linux-2.6] / lib / debug_locks.c
index 0ef01d1..bc3b117 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
  */
+#include <linux/kernel.h>
 #include <linux/rwsem.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
@@ -35,8 +36,9 @@ int debug_locks_silent;
  */
 int debug_locks_off(void)
 {
-       if (xchg(&debug_locks, 0)) {
+       if (__debug_locks_off()) {
                if (!debug_locks_silent) {
+                       oops_in_progress = 1;
                        console_verbose();
                        return 1;
                }