]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dlm: use RSB_HASHED to avoid lookup twice
authorAlexander Aring <aahringo@redhat.com>
Fri, 2 Aug 2024 17:26:44 +0000 (13:26 -0400)
committerDavid Teigland <teigland@redhat.com>
Thu, 8 Aug 2024 20:15:08 +0000 (15:15 -0500)
commit98ff7d95d91b56d8f2fdd0c4d0421f7fbb538cba
treeb426d96a5cf27e54f48ef2966c16db53ee421ccb
parent94e180d6255f5a765bb723e6e8b67f1438ce574b
dlm: use RSB_HASHED to avoid lookup twice

Since commit 01fdeca1cc2d ("dlm: use rcu to avoid an extra rsb struct
lookup") _dlm_master_lookup() is called under rcu lock that prevents
that the rsb structure is being freed. There was a missing change to
avoid an additional lookup and just check that the rsb is still part of
the ls_rsbtbl structure. This patch is doing such check instead of
lookup the rsb structure again.

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