From 1824a781db2dcdb328ba61893a1ace192cb78775 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 9 Jun 2014 01:55:33 +0200 Subject: [PATCH] lvmetad: Drop active connection upon lvmetad_set_active(0). --- lib/cache/lvmetad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index c03590e20..7896dddd8 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -101,6 +101,8 @@ int lvmetad_active(void) void lvmetad_set_active(int active) { _lvmetad_use = active; + if (!active && lvmetad_active()) + lvmetad_disconnect(); } /*