]> git.baikalelectronics.ru Git - kernel.git/commit
dlm: use kref_put_lock in put_rsb
authorAlexander Aring <aahringo@redhat.com>
Mon, 2 May 2022 15:14:09 +0000 (11:14 -0400)
committerDavid Teigland <teigland@redhat.com>
Mon, 2 May 2022 16:22:56 +0000 (11:22 -0500)
commita1b7dc057f04ba03c921a20c3c49de770044a7d3
tree915e72a717f326c3d008cdfdf4379e2385204ec1
parent5e75a551a33072eaa56e78f1fe5e0aee8e1b7672
dlm: use kref_put_lock in put_rsb

This patch will optimize put_rsb() 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