mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-07 05:58:00 +03:00
lvmlockd: move eval of ENOENT
To avoid logging 'errors' for no real error state (ENOENT), move this evaluation upward in the code.
This commit is contained in:
parent
555d6d4e62
commit
bcfe4993e5
@ -2092,7 +2092,8 @@ static int _query_lock_lv(struct cmd_context *cmd, struct volume_group *vg,
|
||||
log_error("Lock query failed for LV %s/%s", vg->name, lv_name);
|
||||
return 0;
|
||||
} else {
|
||||
ret = (result < 0) ? 0 : 1;
|
||||
/* ENOENT => The lv was not active/locked. */
|
||||
ret = (result < 0 && (result != -ENOENT)) ? 0 : 1;
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
@ -2110,10 +2111,6 @@ static int _query_lock_lv(struct cmd_context *cmd, struct volume_group *vg,
|
||||
|
||||
daemon_reply_destroy(reply);
|
||||
|
||||
/* The lv was not active/locked. */
|
||||
if (result == -ENOENT)
|
||||
return 1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user