[netcf-devel] [PATCH] netlink: Do not provide caches, not needed and only complicates thread safety

Laine Stump laine at laine.org
Tue Dec 18 18:05:12 UTC 2012


From: Thomas Graf <tgraf at redhat.com>

netcf does not utilize any of the functionality that would require
providing the caches. Doing so only exposes the cache to possibly
unwanted users.

Signed-off-by: Thomas Graf <tgraf at redhat.com>
---
 src/dutil_linux.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/dutil_linux.c b/src/dutil_linux.c
index 1fe9b26..271c515 100644
--- a/src/dutil_linux.c
+++ b/src/dutil_linux.c
@@ -611,12 +611,10 @@ int netlink_init(struct netcf *ncf) {
     ncf->driver->link_cache = __rtnl_link_alloc_cache(ncf->driver->nl_sock);
     if (ncf->driver->link_cache == NULL)
         goto error;
-    nl_cache_mngt_provide(ncf->driver->link_cache);
 
     ncf->driver->addr_cache = __rtnl_addr_alloc_cache(ncf->driver->nl_sock);
     if (ncf->driver->addr_cache == NULL)
         goto error;
-    nl_cache_mngt_provide(ncf->driver->addr_cache);
 
     int netlink_fd = nl_socket_get_fd(ncf->driver->nl_sock);
     if (netlink_fd >= 0)
-- 
1.7.11.7



More information about the netcf-devel mailing list