1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +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. * This is expected for at least one of them.
*/ */
if (lm_support_dlm()) {
rv = lm_get_lockspaces_dlm(&ls_found); rv = lm_get_lockspaces_dlm(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED)) if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail; goto fail;
}
if (lm_support_sanlock()) {
rv = lm_get_lockspaces_sanlock(&ls_found); rv = lm_get_lockspaces_sanlock(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED)) if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail; goto fail;
}
if (list_empty(&ls_found)) { if (list_empty(&ls_found)) {
log_debug("No lockspaces found to adopt"); log_debug("No lockspaces found to adopt");