aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2022-03-11 20:48:00 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-04-05 23:41:04 +0200
commitc9d52475239e35cce287c1cdccd50c450ad66148 (patch)
tree0e32fe5e6fcf97c78abae3da8afb4bba7d4dfdd2
parent66a68114c429311a83c14ad54cc6a2d33e1bb70b (diff)
downloadbackports-c9d52475239e35cce287c1cdccd50c450ad66148.tar.gz
headers: fix lockdep_assert_not_held()
LOCK_STATE_HELD define was omitted during backport of lockdep_assert_not_held() which leads to build failures of kernels with CONFIG_LOCKDEP=y: backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function) Fix it by adding missing LOCK_STATE_HELD define. References: https://github.com/openwrt/openwrt/pull/9373 Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()") Reported-by: Oskari Rauta <oskari.rauta@gmail.com> Signed-off-by: Petr Å tetiar <ynezz@true.cz>
-rw-r--r--backport/backport-include/linux/lockdep.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/backport/backport-include/linux/lockdep.h b/backport/backport-include/linux/lockdep.h
index ed5ea678..842e24b7 100644
--- a/backport/backport-include/linux/lockdep.h
+++ b/backport/backport-include/linux/lockdep.h
@@ -11,6 +11,9 @@ struct lockdep_map { };
#ifndef lockdep_assert_not_held
#ifdef CONFIG_LOCKDEP
+#ifndef LOCK_STATE_HELD
+#define LOCK_STATE_HELD 1
+#endif /* LOCK_STATE_HELD */
#define lockdep_assert_not_held(l) do { \
WARN_ON(debug_locks && \
lockdep_is_held(l) == LOCK_STATE_HELD); \