1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvmlockd: fix check for other sanlock lockspaces

The check for other sanlock lockspaces was not checking
that the lockspace type was sanlock, so if dlm lockspaces
were visible, they were wrongly included.
This commit is contained in:
David Teigland 2015-08-10 13:16:04 -05:00
parent 1aa7fa354e
commit 6bd5bf3cb5

View File

@ -1981,11 +1981,15 @@ static int other_sanlock_vgs_exist(struct lockspace *ls_rem)
struct lockspace *ls; struct lockspace *ls;
list_for_each_entry(ls, &lockspaces_inactive, list) { list_for_each_entry(ls, &lockspaces_inactive, list) {
if (ls->lm_type != LD_LM_SANLOCK)
continue;
log_debug("other sanlock vg exists inactive %s", ls->name); log_debug("other sanlock vg exists inactive %s", ls->name);
return 1; return 1;
} }
list_for_each_entry(ls, &lockspaces, list) { list_for_each_entry(ls, &lockspaces, list) {
if (ls->lm_type != LD_LM_SANLOCK)
continue;
if (!strcmp(ls->name, ls_rem->name)) if (!strcmp(ls->name, ls_rem->name))
continue; continue;
log_debug("other sanlock vg exists %s", ls->name); log_debug("other sanlock vg exists %s", ls->name);