]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dlm: move dlm_search_rsb_tree() out of lock
authorAlexander Aring <aahringo@redhat.com>
Fri, 2 Aug 2024 17:26:45 +0000 (13:26 -0400)
committerDavid Teigland <teigland@redhat.com>
Thu, 8 Aug 2024 20:15:08 +0000 (15:15 -0500)
commit5be323b0c64dbecdc33b43012f927e6af82d62d3
tree01a3c042f237c1c61dcffb6a096e7df05d1b0bd0
parent98ff7d95d91b56d8f2fdd0c4d0421f7fbb538cba
dlm: move dlm_search_rsb_tree() out of lock

The rhashtable structure is lockless for readers such as
rhashtable_lookup_fast(). It should be save to call this lookup
functionality out of holding ls_rsbtbl_lock to get the rsb pointer out
of the hash. This reduce the contention time of ls_rsbtbl_lock in some
cases. We still need to check if the rsb is part of the check as this
state can be changed while ls_rsbtbl_lock is not held. If its part of
the rhashtable data structure we take a reference to be sure it will not
be freed after we drop the ls_rsbtbl_lock read lock.

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