From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30478 invoked by alias); 28 Feb 2011 17:05:49 -0000 Received: (qmail 30460 invoked by uid 9796); 28 Feb 2011 17:05:49 -0000 Date: Mon, 28 Feb 2011 17:05:00 -0000 Message-ID: <20110228170549.30458.qmail@sourceware.org> From: prajnoha@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/format_text format-text.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00079.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: prajnoha@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. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.170&r2=1.171 --- LVM2/lib/format_text/format-text.c 2011/02/28 13:19:02 1.170 +++ LVM2/lib/format_text/format-text.c 2011/02/28 17:05:48 1.171 @@ -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;