dlm: use rcu to avoid an extra rsb struct lookup
authorAlexander Aring <aahringo@redhat.com>
Mon, 10 Jun 2024 20:26:03 +0000 (15:26 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 10 Jun 2024 20:26:03 +0000 (15:26 -0500)
commit01fdeca1cc2dd705b1391f31a2594214c8bd7886
tree31da92c905bf972bbbbf71f15c095a5773ff0b17
parentc217adfc8caad240ec7bed446a6a1a801d5acc6d
dlm: use rcu to avoid an extra rsb struct lookup

Use rcu to free rsb structs, and hold the rcu read lock
while looking up rsb structs.  This allows us to avoid an
extra hash table lookup for an rsb.  A new rsb flag HASHED
is added which is set while the rsb is in the hash table.
This flag is checked in place of repeating the hash table
lookup.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/dlm_internal.h
fs/dlm/lock.c
fs/dlm/memory.c