summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-08-10 13:16:04 -0500
committerDavid Teigland <teigland@redhat.com>2015-08-10 13:16:04 -0500
commit6bd5bf3cb5a1c01ec8be8bb714c7c0461d6bec58 (patch)
tree322d4404aaaf8d20204289956bc1bbc1a1e2fe87
parent1aa7fa354e6ed3e468dc7966f5df0009627b2b97 (diff)
downloadlvm2-6bd5bf3cb5a1c01ec8be8bb714c7c0461d6bec58.tar.gz
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.
-rw-r--r--daemons/lvmlockd/lvmlockd-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c
index 7493d1128..5e4e73f03 100644
--- a/daemons/lvmlockd/lvmlockd-core.c
+++ b/daemons/lvmlockd/lvmlockd-core.c
@@ -1981,11 +1981,15 @@ static int other_sanlock_vgs_exist(struct lockspace *ls_rem)
struct lockspace *ls;
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);
return 1;
}
list_for_each_entry(ls, &lockspaces, list) {
+ if (ls->lm_type != LD_LM_SANLOCK)
+ continue;
if (!strcmp(ls->name, ls_rem->name))
continue;
log_debug("other sanlock vg exists %s", ls->name);