Commit b9cb2788 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs: for linux-v5.11-rc1, dummy def lockdep_is_held()



By the commit in mainline v5.11-rc1,
cd539cff9470f 2020-11-02 lockdep: Provide dummy forward declaration of
	*_is_held() helpers
aufs has to introduce a workaround in case of !LOCKDEP to call
*_is_held() helpers.
Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
parent 5bf2a196
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
/* to debug easier, do not make them inlined functions */ /* to debug easier, do not make them inlined functions */
#define AuRwMustNoWaiters(rw) AuDebugOn(rwsem_is_contended(rw)) #define AuRwMustNoWaiters(rw) AuDebugOn(rwsem_is_contended(rw))
#ifdef CONFIG_LOCKDEP
/* rwsem_is_locked() is unusable */ /* rwsem_is_locked() is unusable */
#define AuRwMustReadLock(rw) AuDebugOn(!lockdep_recursing(current) \ #define AuRwMustReadLock(rw) AuDebugOn(!lockdep_recursing(current) \
&& debug_locks \ && debug_locks \
...@@ -32,6 +34,12 @@ ...@@ -32,6 +34,12 @@
#define AuRwDestroy(rw) AuDebugOn(!lockdep_recursing(current) \ #define AuRwDestroy(rw) AuDebugOn(!lockdep_recursing(current) \
&& debug_locks \ && debug_locks \
&& lockdep_is_held(rw)) && lockdep_is_held(rw))
#else
#define AuRwMustReadLock(rw) do {} while (0)
#define AuRwMustWriteLock(rw) do {} while (0)
#define AuRwMustAnyLock(rw) do {} while (0)
#define AuRwDestroy(rw) do {} while (0)
#endif
#define au_rw_init(rw) init_rwsem(rw) #define au_rw_init(rw) init_rwsem(rw)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment