]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit02707cb08a8990a9ef61dc5af150f0679dee4a89
tree45827ae0ce336cc0767bcb09938772df4497a809
parent5436827a623eba3678f4920bbc542ecb7cf06cad
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