2018-06-01-stable - pvresize: add missing return
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5503699c3701ed4875c274f12b8fdd6b099db71b Commit: 5503699c3701ed4875c274f12b8fdd6b099db71b Parent: e0bfc946cb182a021bb7a74a11ec7ac51ad9a7b0 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jun 5 21:21:26 2018 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Jun 22 12:37:09 2018 +0200
pvresize: add missing return
Log error path missed return 0.
Also fix some unneded bactraces (since log_error already shows position).
--- WHATS_NEW | 1 + lib/metadata/pv_manip.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.180 - ================================= + Fix check if resized PV can also fit metadata area. Reopen devices RDWR before writing to avoid udev issues. Fix mem leak in clvmd.
lib/metadata/pv_manip.c +3 -2
@@ -566,6 +566,7 @@ static int _pv_resize(struct physical_volume *pv, struct volume_group *vg, uint6log_error ("Size must exceed physical extent start " "of %" PRIu64" sectors on PV %s." ,pv_pe_start (pv),pv_dev_name (pv)); +return 0 ; } old_pe_count = pv->pe_count;
@@ -645,7 +646,7 @@ int pv_resize_single(struct cmd_context *cmd, pv_name, display_size(cmd, new_size), display_size(cmd, size)) == 'n') {log_error ("Physical Volume %s not resized." , pv_name); - goto_out; + goto out; } }else if (new_size < size)
@@ -653,7 +654,7 @@ int pv_resize_single(struct cmd_context *cmd, pv_name, display_size(cmd, new_size), display_size(cmd, size)) == 'n') {log_error ("Physical Volume %s not resized." , pv_name); - goto_out; + goto out; }if (new_size == size)