mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: clarify lock_type use for coverity
Make it clearer when vg->lock_type will be used so coverity doesn't worry about it.
This commit is contained in:
parent
b6f0f20da2
commit
09177b53dd
@ -2929,13 +2929,15 @@ int vg_write(struct volume_group *vg)
|
||||
struct lv_list *lvl;
|
||||
int revert = 0, wrote = 0;
|
||||
|
||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||
if (lvl->lv->lock_args && !strcmp(lvl->lv->lock_args, "pending")) {
|
||||
if (!lockd_init_lv_args(vg->cmd, vg, lvl->lv, vg->lock_type, &lvl->lv->lock_args)) {
|
||||
log_error("Cannot allocate lock for new LV.");
|
||||
return 0;
|
||||
if (vg_is_shared(vg)) {
|
||||
dm_list_iterate_items(lvl, &vg->lvs) {
|
||||
if (lvl->lv->lock_args && !strcmp(lvl->lv->lock_args, "pending")) {
|
||||
if (!lockd_init_lv_args(vg->cmd, vg, lvl->lv, vg->lock_type, &lvl->lv->lock_args)) {
|
||||
log_error("Cannot allocate lock for new LV.");
|
||||
return 0;
|
||||
}
|
||||
lvl->lv->new_lock_args = 1;
|
||||
}
|
||||
lvl->lv->new_lock_args = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user