]> granicus.if.org Git - ipset/commitdiff
ipset: remove unused code
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 7 Jan 2014 16:31:47 +0000 (17:31 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 7 Jan 2014 16:31:47 +0000 (17:31 +0100)
Function never used in current upstream code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/include/linux/netfilter/ipset/ip_set.h
kernel/net/netfilter/ipset/ip_set_core.c

index 7cde1cf053ea120f0e31331eb8e8cc58da3435ed..e06411b763b771b19a32458cfd3dd7fab9585016 100644 (file)
@@ -332,7 +332,6 @@ extern ip_set_id_t ip_set_get_byname(struct net *net,
                                     const char *name, struct ip_set **set);
 extern void ip_set_put_byindex(struct net *net, ip_set_id_t index);
 extern const char *ip_set_name_byindex(struct net *net, ip_set_id_t index);
-extern ip_set_id_t ip_set_nfnl_get(struct net *net, const char *name);
 extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index);
 extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index);
 
index 31c18cfd485c142ea367b39b2b61d0f1658f7747..020d7c8bd1027ae1737a986872c5c3a20cfa9abc 100644 (file)
@@ -630,34 +630,6 @@ EXPORT_SYMBOL_GPL(ip_set_name_byindex);
  * call nfnl_lock for us.
  */
 
-/*
- * Find set by name, reference it once. The reference makes sure the
- * thing pointed to, does not go away under our feet.
- *
- * The nfnl mutex is used in the function.
- */
-ip_set_id_t
-ip_set_nfnl_get(struct net *net, const char *name)
-{
-       ip_set_id_t i, index = IPSET_INVALID_ID;
-       struct ip_set *s;
-       struct ip_set_net *inst = ip_set_pernet(net);
-
-       lock_nfnl();
-       for (i = 0; i < inst->ip_set_max; i++) {
-               s = nfnl_set(inst, i);
-               if (s != NULL && STREQ(s->name, name)) {
-                       __ip_set_get(s);
-                       index = i;
-                       break;
-               }
-       }
-       unlock_nfnl();
-
-       return index;
-}
-EXPORT_SYMBOL_GPL(ip_set_nfnl_get);
-
 /*
  * Find set by index, reference it once. The reference makes sure the
  * thing pointed to, does not go away under our feet.