dlm: avoid unnecessary posix unlock
authorDavid Teigland <teigland@redhat.com>
Fri, 5 Apr 2013 09:57:15 +0000 (10:57 +0100)
committerDavid Teigland <teigland@redhat.com>
Mon, 8 Apr 2013 17:03:15 +0000 (12:03 -0500)
commit900083183959107159f962b83b3b439d53796499
tree45827ae0ce336cc0767bcb09938772df4497a809
parent31880c37c11e28cb81c70757e38392b42e695dc6
dlm: avoid unnecessary posix unlock

When the kernel clears flocks/plocks during close, it calls posix
unlock when there are flocks but no posix locks.  Without this
patch, that unnecessary posix unlock is passed to userland
(dlm_controld), across the cluster, and back to the kernel.
This can create a lot of plock activity, even when no posix
locks had been used.

This patch copies the nfs approach, and skips the full posix
unlock if there is no plock found during the vfs unlock phase.

Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/plock.c