1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

If the same fid is already same avoid ref_counting

This commit is contained in:
Zdenek Kabelac 2012-02-13 11:01:34 +00:00
parent 960ee343f3
commit 65079de265
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.92 -
====================================
Skip pv/vg_set_fid processing if the fid is same.
Check for foreach loop errors in _vg_read_orphans() (2.02.91).
Clean error paths for format instance creation (2.02.91).
Release vg in error path of _format1_vg_read() instead of just free().

View File

@ -4149,6 +4149,9 @@ bad:
void pv_set_fid(struct physical_volume *pv,
struct format_instance *fid)
{
if (fid == pv->fid)
return;
if (fid)
fid->ref_count++;
@ -4163,6 +4166,9 @@ void vg_set_fid(struct volume_group *vg,
{
struct pv_list *pvl;
if (fid == vg->fid)
return;
if (fid)
fid->ref_count++;