]> git.proxmox.com Git - pve-cluster.git/commit
cfs_lock: swap checks for specific errors with $got_lock
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Nov 2017 08:47:25 +0000 (09:47 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 9 Nov 2017 09:30:29 +0000 (10:30 +0100)
commit96857ee4cb299a1b211004e8273a919162511748
treee114eac715426d777e148509e254db5b9b6458ba
parentbcdb1b3abae0566cc3c46a979f53fccfd078897e
cfs_lock: swap checks for specific errors with $got_lock

We checked if a specific error was set or, respectively, not set to
know if we got the lock or not.
The check if we may unlock again was negated and thus could lead to
problems, in specific - rather unlikely - cases.

Use the by the previous patch added $got_lock variable, which only
gets set when we really got the lock, instead.

While refactoring for the new variable, set the $noerr parameter of
check_cfs_quorum() as we do not want to die here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/Cluster.pm