LVM2/lib/format_text format-text.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2011-02-28 17:05:48
Modified files:
lib/format_text: format-text.c
Log message:
Use pv->vg_name directly instead of pv->vg->name in _text_pv_write.
This also prevents a possible segfault during an automatic repair when the PV does not belong to a VG anymore and we call pv_write_orphan.
lib/format_text/format-text.c +1 -2
@@ -1273,8 +1273,7 @@/* Add a new cache entry with PV info or update existing one. */ if (!(info =lvmcache_add (fmt->labeller, (const char *) &pv->id, - pv->dev, pv->vg ? pv->vg->name :FMT_TEXT_ORPHAN_VG_NAME , -NULL ,0 ))) + pv->dev, pv->vg_name,NULL ,0 ))) return_0; label = info->label;