Remove incorrect code at the bottom of _lv_reduce.
PATCH 1/1 Remove incorrect code at the bottom of _lv_reduce.
Makes no sense to be calling lv_setup if we're removing an LV. I suspect this code always succeeds and this is why it does not matter here. Even so, it is misleading / incorrect to be doing this so remove it.
NOTE: Untested.
Signed-off-by Dave Wysochanski <[email protected]>
--- lib/metadata/lv_manip.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
lib/metadata/lv_manip.c +0 -3
@@ -435,9 +435,6 @@ static int _lv_reduce(struct logical_volume *lv, uint32_t extents, int delete)/* Remove the LV if it is now empty */ if (!lv->le_count && !unlink_lv_from_vg (lv)) return_0; -else if (lv->vg->fid->fmt->ops->lv_setup && - !lv->vg->fid->fmt->ops->lv_setup (lv->vg->fid, lv)) - return_0;return 1 ; }
Signature · 1 line
1.6.0.6