summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-11-16 10:11:56 -0800
committerLinux Build Service Account <lnxbuild@localhost>2019-11-16 10:11:56 -0800
commitfeb565e67fc2b2f2a95890577120141be5886594 (patch)
treeb9057c7253ca0180b12d885d5a5140d5f90eb927 /kernel/locking
parent6ed4c5de4bb191a209c629463678e34f076fb417 (diff)
parent739a986440ba67d48277fd553a5fe32ab008666d (diff)
Merge 739a986440ba67d48277fd553a5fe32ab008666d on remote branch
Change-Id: Idd84f971e07f65aa635d7d499dde696b84b217b6
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/lockdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index f2df5f86af28..a419696709a1 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -3314,6 +3314,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,