]> sourceware.org Git - lvm2.git/commit
Move increment of vg->pv_count from import_pool_vg() to import_pool_pvs().
authorDave Wysochanski <dwysocha@redhat.com>
Tue, 13 Apr 2010 17:25:26 +0000 (17:25 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Tue, 13 Apr 2010 17:25:26 +0000 (17:25 +0000)
commitb33c7a4597c4fd84fc3c076925478441183622af
tree3ec5843382450be63a61de49d563c79582854ef8
parent788b9bfdc76052759dc138dc942c9ca3e0763e88
Move increment of vg->pv_count from import_pool_vg() to import_pool_pvs().

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>
lib/format_pool/import_export.c
This page took 0.027854 seconds and 5 git commands to generate.