summaryrefslogtreecommitdiff
path: root/tools/pvmove.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-08-18 11:46:42 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-08-18 15:00:07 +0200
commitae4db9f302701ccbde1409647a85f53feaa6e13b (patch)
treefcece72339ea8156ca24fa4db19397d643314074 /tools/pvmove.c
parent70db1d523db330cbdfc39163c30dc00cf16a1fdc (diff)
downloadlvm2-ae4db9f302701ccbde1409647a85f53feaa6e13b.tar.gz
lockd: check for failing unlock
Avoid ignoring unlocking error.
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r--tools/pvmove.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c
index 70826c647..849780afe 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -712,7 +712,10 @@ out_ret:
* for some time monitoring the progress, and we don not want
* or need the lockd lock held over that.
*/
- lockd_vg(cmd, vg_name, "un", 0, &lockd_state);
+ if (!lockd_vg(cmd, vg_name, "un", 0, &lockd_state)) {
+ stack;
+ r = ECMD_FAILED;
+ }
return r;
}
@@ -762,7 +765,10 @@ static int _read_poll_id_from_pvname(struct cmd_context *cmd, const char *pv_nam
unlock_and_release_vg(cmd, vg, vg_name);
out:
- lockd_vg(cmd, vg_name, "un", 0, &lockd_state);
+ if (!lockd_vg(cmd, vg_name, "un", 0, &lockd_state)) {
+ stack;
+ ret = 0;
+ }
free_pv_fid(pv);
return ret;
}