"Zhengyuan Liu":
> Yes, ubuntu-focal.git/master-next updates too fast. I am using
> 0ff1d85115fe ("UBUNTU: Ubuntu-5.4.0-66.74"), and that corresponds to
> "5.4.86". It doesn't matter, latest master-next should reproduce this
> problem too.
I think I could reproduce the problem using 0ff1d85115fe ("UBUNTU:
Ubuntu-5.4.0-66.74").
It comes from the configuration of
- CONFIG_AUFS_DEBUG is enabled
- CONFIG_LOCKDEP is disabled
In order to make it sure, I'd suggest you to try enabling
CONFIG_LOCKDEP. But it has a performance impact all over the kernel. If
it is not acceptable for you, please try this patch which fixes a bug in
aufs. I am testing it now, and the result will be clear on tommorow.
J. R. Okajima
diff --git a/fs/aufs/rwsem.h b/fs/aufs/rwsem.h
index 370eae1593489..f1a9fdd5e567b 100644
--- a/fs/aufs/rwsem.h
+++ b/fs/aufs/rwsem.h
@@ -33,17 +33,21 @@
/* to debug easier, do not make them inlined functions */
#define AuRwMustNoWaiters(rw) AuDebugOn(rwsem_is_contended(rw))
/* rwsem_is_locked() is unusable */
-#define AuRwMustReadLock(rw) AuDebugOn(!lockdep_recursing(current) \
- && debug_locks \
+#define AuRwMustReadLock(rw) AuDebugOn(IS_ENABLED(CONFIG_LOCKDEP) \
+ && !lockdep_recursing(current) \
+ && debug_locks \
&& !lockdep_is_held_type(rw, 1))
-#define AuRwMustWriteLock(rw) AuDebugOn(!lockdep_recursing(current) \
- && debug_locks \
+#define AuRwMustWriteLock(rw) AuDebugOn(IS_ENABLED(CONFIG_LOCKDEP) \
+ && !lockdep_recursing(current) \
+ && debug_locks \
&& !lockdep_is_held_type(rw, 0))
-#define AuRwMustAnyLock(rw) AuDebugOn(!lockdep_recursing(current) \
- && debug_locks \
+#define AuRwMustAnyLock(rw) AuDebugOn(IS_ENABLED(CONFIG_LOCKDEP) \
+ && !lockdep_recursing(current) \
+ && debug_locks \
&& !lockdep_is_held(rw))
-#define AuRwDestroy(rw) AuDebugOn(!lockdep_recursing(current) \
- && debug_locks \
+#define AuRwDestroy(rw) AuDebugOn(IS_ENABLED(CONFIG_LOCKDEP)
\
+ && !lockdep_recursing(current) \
+ && debug_locks \
&& lockdep_is_held(rw))
#define au_rw_init(rw) init_rwsem(rw)