Skip to contentSkip to conversation

Remove incorrect code at the bottom of _lv_reduce.

PATCH New Dave Wysochanski 1 participant 1 message Dec 3, 2009

lore
Share & tools
lore
#0 lore raw

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.

---
 lib/metadata/lv_manip.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
lib/metadata/lv_manip.c +0 -3
index c440278..8a8a44e 100644
@@ -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