Rename to virNWFilterDoInstantiate to better describe the action.
Also fix the @vmuuid parameter to not have the ATTRIBUTE_UNUSED since it
is used in the call to virNWFilterDHCPSnoopReq.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/nwfilter/nwfilter_gentech_driver.c | 46 +++++++++++++++-------------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/src/nwfilter/nwfilter_gentech_driver.c
b/src/nwfilter/nwfilter_gentech_driver.c
index 82e20de..9c11cb3 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -59,7 +59,7 @@ static virNWFilterTechDriverPtr filter_tech_drivers[] = {
/* Serializes instantiation of filters. This is necessary
* to avoid lock ordering deadlocks. eg __virNWFilterInstantiateFilter
* will hold a lock on a virNWFilterObjPtr. This in turn invokes
- * virNWFilterInstantiate which invokes virNWFilterDetermineMissingVarsRec
+ * virNWFilterDoInstantiate which invokes virNWFilterDetermineMissingVarsRec
* which invokes virNWFilterObjListFindByName. This iterates over every single
* virNWFilterObjPtr in the list. So if 2 threads try to instantiate a
* filter in parallel, they'll both hold 1 lock at the top level in
@@ -604,7 +604,7 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter,
/**
- * virNWFilterInstantiate:
+ * virNWFilterDoInstantiate:
* @vmuuid: The UUID of the VM
* @techdriver: The driver to use for instantiation
* @filter: The filter to instantiate
@@ -624,18 +624,19 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter,
* Call this function while holding the NWFilter filter update lock
*/
static int
-virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
- virNWFilterTechDriverPtr techdriver,
- virNWFilterDefPtr filter,
- const char *ifname,
- int ifindex,
- const char *linkdev,
- virNWFilterHashTablePtr vars,
- enum instCase useNewFilter, bool *foundNewFilter,
- bool teardownOld,
- const virMacAddr *macaddr,
- virNWFilterDriverStatePtr driver,
- bool forceWithPendingReq)
+virNWFilterDoInstantiate(const unsigned char *vmuuid,
+ virNWFilterTechDriverPtr techdriver,
+ virNWFilterDefPtr filter,
+ const char *ifname,
+ int ifindex,
+ const char *linkdev,
+ virNWFilterHashTablePtr vars,
+ enum instCase useNewFilter,
+ bool *foundNewFilter,
+ bool teardownOld,
+ const virMacAddr *macaddr,
+ virNWFilterDriverStatePtr driver,
+ bool forceWithPendingReq)
{
int rc;
virNWFilterInst inst;
@@ -867,18 +868,11 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
break;
}
- rc = virNWFilterInstantiate(vmuuid,
- techdriver,
- filter,
- ifname,
- ifindex,
- linkdev,
- vars,
- useNewFilter, foundNewFilter,
- teardownOld,
- macaddr,
- driver,
- forceWithPendingReq);
+ rc = virNWFilterDoInstantiate(vmuuid, techdriver, filter,
+ ifname, ifindex, linkdev,
+ vars, useNewFilter, foundNewFilter,
+ teardownOld, macaddr, driver,
+ forceWithPendingReq);
virNWFilterHashTableFree(vars);
--
2.9.4