From c1a340b484eab81a4b9a81d6007f690661b5e3da Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 24 Nov 2019 04:49:58 +0000 Subject: [PATCH] scst: Fix the build against kernel v5.0 and before Fixes: ef161f930f46 ("scst: Rework handling of recursive locking") Reported-by: Ville Skytta git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8669 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 6df7ca081..fca5f414e 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -839,6 +839,20 @@ static inline bool list_entry_in_list(const struct list_head *entry) #define lockdep_assert_held(l) (void)(l) #endif +/* + * See also commit 108c14858b9e ("locking/lockdep: Add support for dynamic + * keys"). + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) +static inline void lockdep_register_key(struct lock_class_key *key) +{ +} + +static inline void lockdep_unregister_key(struct lock_class_key *key) +{ +} +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) /*