mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Move the increment of vg->pv_count next to the place where we add to vg->pvs. It looks safe to do this since the only caller of import_pool_vg() calls import_pool_pvs() immediately afterward, and there is no way import_pool_vg() can fail (always returns 1). However, if there's a memory allocation failure inside import_pool_pvs(), we will end up with a different count in vg->pv_count that with the original code. In any case, vg->pv_count should be as close to dm_list_size(&vg->pvs) as possible, as is the case everywhere else in the code. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>