1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

lvmlockd: don't adopt locks from unused lm

When built without dlm or sanlock support, don't
attempt to adopt locks from that lm.
This commit is contained in:
David Teigland 2016-01-28 09:42:45 -06:00
parent 0ad40a76c0
commit 762b0d697f

View File

@ -5153,13 +5153,17 @@ static void adopt_locks(void)
* This is expected for at least one of them.
*/
rv = lm_get_lockspaces_dlm(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
if (lm_support_dlm()) {
rv = lm_get_lockspaces_dlm(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
}
rv = lm_get_lockspaces_sanlock(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
if (lm_support_sanlock()) {
rv = lm_get_lockspaces_sanlock(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;
}
if (list_empty(&ls_found)) {
log_debug("No lockspaces found to adopt");