]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/locking/lockdep.c
locking/lockdep: Add debug_locks check in __lock_downgrade()
[linux.git] / kernel / locking / lockdep.c
index 608f74ed8bb9016a1d8670f6fffee1bcfa1a173f..7f7db23fc002aba0044f3b924ec8c5cde67bd190 100644 (file)
@@ -3479,6 +3479,9 @@ __lock_set_class(struct lockdep_map *lock, const char *name,
        unsigned int depth;
        int i;
 
+       if (unlikely(!debug_locks))
+               return 0;
+
        depth = curr->lockdep_depth;
        /*
         * This function is about (re)setting the class of a held lock,