mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-10 05:18:36 +03:00
If the same fid is already same avoid ref_counting
This commit is contained in:
parent
5ca11ba420
commit
b2b5a2268a
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.92 -
|
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).
|
Check for foreach loop errors in _vg_read_orphans() (2.02.91).
|
||||||
Clean error paths for format instance creation (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().
|
Release vg in error path of _format1_vg_read() instead of just free().
|
||||||
|
@ -4149,6 +4149,9 @@ bad:
|
|||||||
void pv_set_fid(struct physical_volume *pv,
|
void pv_set_fid(struct physical_volume *pv,
|
||||||
struct format_instance *fid)
|
struct format_instance *fid)
|
||||||
{
|
{
|
||||||
|
if (fid == pv->fid)
|
||||||
|
return;
|
||||||
|
|
||||||
if (fid)
|
if (fid)
|
||||||
fid->ref_count++;
|
fid->ref_count++;
|
||||||
|
|
||||||
@ -4163,6 +4166,9 @@ void vg_set_fid(struct volume_group *vg,
|
|||||||
{
|
{
|
||||||
struct pv_list *pvl;
|
struct pv_list *pvl;
|
||||||
|
|
||||||
|
if (fid == vg->fid)
|
||||||
|
return;
|
||||||
|
|
||||||
if (fid)
|
if (fid)
|
||||||
fid->ref_count++;
|
fid->ref_count++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user