diff options
author | David Teigland <teigland@redhat.com> | 2022-04-08 11:28:53 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-04-08 11:34:04 -0500 |
commit | d14245c72425b99c3bc33a533da46962d010871a (patch) | |
tree | 6e8b300bf22e9af0d7c7b9af281f888731f2cb23 /daemons/lvmlockd/lvmlockd-sanlock.c | |
parent | 99f9bb28c9bf9cc5bda14674a3827ec5164b2872 (diff) | |
download | lvm2-d14245c72425b99c3bc33a533da46962d010871a.tar.gz |
lvmlockd: return error from vgcreate init_vg_sanlock
in vgcreate for shared sanlock vg, if sanlock_write_resource
returns an unexpected error, then make init_vg_sanlock fail
which will cause the vgcreate to fail.
Diffstat (limited to 'daemons/lvmlockd/lvmlockd-sanlock.c')
-rw-r--r-- | daemons/lvmlockd/lvmlockd-sanlock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c index 3f078ea41..3f3ee14f3 100644 --- a/daemons/lvmlockd/lvmlockd-sanlock.c +++ b/daemons/lvmlockd/lvmlockd-sanlock.c @@ -684,10 +684,10 @@ int lm_init_vg_sanlock(char *ls_name, char *vg_name, uint32_t flags, char *vg_ar break; } - if (rv) { + if (rv < 0) { log_error("clear lv resource area %llu error %d", (unsigned long long)offset, rv); - break; + return rv; } offset += align_size; } |