]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: use kref_put_lock in __put_lkb
authorAlexander Aring <aahringo@redhat.com>
Mon, 2 May 2022 15:14:10 +0000 (11:14 -0400)
committerDavid Teigland <teigland@redhat.com>
Mon, 2 May 2022 16:23:49 +0000 (11:23 -0500)
commit0be34a962d40d1c73ffa928b00b66b31379e2cda
treeb2ca657b32bb99488d760c16832ca5c9f909550a
parenta1b7dc057f04ba03c921a20c3c49de770044a7d3
dlm: use kref_put_lock in __put_lkb

This patch will optimize __put_lkb() by using kref_put_lock(). The
function kref_put_lock() will only take the lock if the reference is
going to be zero, if not the lock will never be held.

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