mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: check return value
Log problems on fail path.
This commit is contained in:
parent
86a3a0c765
commit
2b3dcd754f
@ -1742,7 +1742,8 @@ static void _init_thread_signals(void)
|
||||
sigset_t my_sigset;
|
||||
struct sigaction act = { .sa_handler = _sig_alarm };
|
||||
|
||||
sigaction(SIGALRM, &act, NULL);
|
||||
if (sigaction(SIGALRM, &act, NULL))
|
||||
log_sys_debug("sigaction", "SIGLARM");
|
||||
sigfillset(&my_sigset);
|
||||
|
||||
/* These are used for exiting */
|
||||
|
@ -6821,7 +6821,8 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
display_lvname(pool_lv));
|
||||
}
|
||||
|
||||
lockd_lv(cmd, lock_lv, "un", LDLV_PERSISTENT);
|
||||
if (!lockd_lv(cmd, lv, "un", LDLV_PERSISTENT))
|
||||
log_warn("WARNING: Failed to unlock %s.", display_lvname(lv));
|
||||
lockd_free_lv(cmd, vg, lv->name, &lv->lvid.id[1], lv->lock_args);
|
||||
|
||||
if (!suppress_remove_message && (visible || historical)) {
|
||||
@ -8858,7 +8859,8 @@ deactivate_and_revert_new_lv:
|
||||
}
|
||||
|
||||
revert_new_lv:
|
||||
lockd_lv(cmd, lv, "un", LDLV_PERSISTENT);
|
||||
if (!lockd_lv(cmd, lv, "un", LDLV_PERSISTENT))
|
||||
log_warn("WARNING: Failed to unlock %s.", display_lvname(lv));
|
||||
lockd_free_lv(vg->cmd, vg, lv->name, &lv->lvid.id[1], lv->lock_args);
|
||||
|
||||
/* FIXME Better to revert to backup of metadata? */
|
||||
|
Loading…
Reference in New Issue
Block a user