Re: [PATCH 1/3] network: consolidate connection count updates for device pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/11/2016 04:37 PM, Laine Stump wrote:
> networkReleaseActualDevice() and networkNotifyActualDevice() both were
> updating the individual devices' connections count in two separate
> places (unlike networkAllocateActualDevice() which does it in a single
> unified place after success:). The code is correct, but prone to
> confusion / later breakage. All of these updates are anyway located at
> the end of if/else clauses that are (with the exception of a single
> VIR_DEBUG() in each case) immediately followed by the success: label
> anyway, so this patch replaces the duplicated ++/-- instructions with
> a single ++/-- inside a qualifying "if (dev)" down below success:.
> (NB: if dev != NULL, by definition we are using a device (either pci
> or netdev, doesn't matter for these purposes) from the network's pool)
> 
> The VIR_DEBUG args (which will be replaced in a followup patch anyway)
> were all adjusted to account for the connection count being out of
> date at the time.
> ---
>  src/network/bridge_driver.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 

ACK

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]