diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-09-24 00:13:56 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-09-24 00:21:49 -0400 |
commit | b60a78bdec3ed2eeaf22f1116506f6ef5dc28f59 (patch) | |
tree | debb0022b81e07bdcd9893855193fbb73b2b52b0 | |
parent | 6c3a5d4ebd80098d974069a836dfc74c8c54daf8 (diff) |
six locks: Enable lockdep
Now that we have lockdep_set_no_check_recursion(), we can enable lockdep
checking.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | kernel/locking/six.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/locking/six.c b/kernel/locking/six.c index 91cbca5a1ae9..ede68ff5d57f 100644 --- a/kernel/locking/six.c +++ b/kernel/locking/six.c @@ -16,7 +16,7 @@ #define EBUG_ON(cond) do {} while (0) #endif -#define six_acquire(l, t) lock_acquire(l, 0, t, 0, 0, NULL, _RET_IP_) +#define six_acquire(l, t, r) lock_acquire(l, 0, t, r, 1, NULL, _RET_IP_) #define six_release(l) lock_release(l, _RET_IP_) static void do_six_unlock_type(struct six_lock *lock, enum six_lock_type type); @@ -278,7 +278,7 @@ static bool __six_trylock_type(struct six_lock *lock, enum six_lock_type type) return false; if (type != SIX_LOCK_write) - six_acquire(&lock->dep_map, 1); + six_acquire(&lock->dep_map, 1, type == SIX_LOCK_read); return true; } @@ -315,7 +315,7 @@ static bool __six_relock_type(struct six_lock *lock, enum six_lock_type type, six_lock_wakeup(lock, old, SIX_LOCK_write); if (ret) - six_acquire(&lock->dep_map, 1); + six_acquire(&lock->dep_map, 1, type == SIX_LOCK_read); return ret; } @@ -332,7 +332,7 @@ static bool __six_relock_type(struct six_lock *lock, enum six_lock_type type, six_set_owner(lock, type, old, current); if (type != SIX_LOCK_write) - six_acquire(&lock->dep_map, 1); + six_acquire(&lock->dep_map, 1, type == SIX_LOCK_read); return true; } @@ -478,7 +478,7 @@ static int __six_lock_type_waiter(struct six_lock *lock, enum six_lock_type type int ret; if (type != SIX_LOCK_write) - six_acquire(&lock->dep_map, 0); + six_acquire(&lock->dep_map, 0, type == SIX_LOCK_read); ret = do_six_trylock_type(lock, type, true) ? 0 : __six_lock_type_slowpath(lock, type, wait, should_sleep_fn, p); @@ -648,7 +648,7 @@ void six_lock_increment(struct six_lock *lock, enum six_lock_type type) { const struct six_lock_vals l[] = LOCK_VALS; - six_acquire(&lock->dep_map, 0); + six_acquire(&lock->dep_map, 0, type == SIX_LOCK_read); /* XXX: assert already locked, and that we don't overflow: */ |