summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2022-01-04 14:47:31 -0600
committerDavid Teigland <teigland@redhat.com>2022-01-04 14:53:47 -0600
commit42a16aa6f34d801bfea169b4f6d1fef5d89961f6 (patch)
tree819cc80ecf685c58bb2cb5cf2bdf9d3a428d157f
parent04fbffb116eaf5fb1b10785df92966d0083b270f (diff)
downloadlvm2-42a16aa6f34d801bfea169b4f6d1fef5d89961f6.tar.gz
lvmlockd: cleanup after sanlock_rem_lockspace error
When storage is lost under a sanlock VG, and kill_vg/drop_vg are used, sanlock_rem_lockspace() may return an error, but the cleanup steps should still be performed. Without the cleanup, gl_lsname_sanlock was not cleared. This caused future lock requests to fail with ENOLS, but the NO_GL_LS flag was not set due to gl_lsname_sanlock being set. This caused lockd_global(sh) in lvm commands to fail when they could succeed. Fix from guozhonghua216
-rw-r--r--daemons/lvmlockd/lvmlockd-sanlock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index e595eeffd..3f078ea41 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -1576,10 +1576,8 @@ int lm_rem_lockspace_sanlock(struct lockspace *ls, int free_vg)
goto out;
rv = sanlock_rem_lockspace(&lms->ss, 0);
- if (rv < 0) {
+ if (rv < 0)
log_error("S %s rem_lockspace_san error %d", ls->name, rv);
- return rv;
- }
if (free_vg) {
/*