From a9bfa58f6b893d14cd4ffff7ef14084fcdc0ebe9 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 29 Oct 2010 22:50:12 +0200 Subject: Remove to support resizing from kernel context. Resizing in kernel context is simply too expensive. Drop the feature: if a set is used as a dynamic container by a SET target, then the set must be created with a proper size from now on. --- kernel/ip_set.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'kernel') diff --git a/kernel/ip_set.c b/kernel/ip_set.c index 5e91d50..ad1505d 100644 --- a/kernel/ip_set.c +++ b/kernel/ip_set.c @@ -243,7 +243,7 @@ ip_set_add(ip_set_id_t index, const struct sk_buff *skb, u8 family, u8 dim, u8 flags) { struct ip_set *set = ip_set_list[index]; - int ret = 0, retried = 0; + int ret; BUG_ON(set == NULL || atomic_read(&set->ref) == 0); pr_debug("set %s, index %u", set->name, index); @@ -252,17 +252,10 @@ ip_set_add(ip_set_id_t index, const struct sk_buff *skb, || !(family == set->family || set->family == AF_UNSPEC)) return 0; -retry: write_lock_bh(&set->lock); ret = set->variant->kadt(set, skb, IPSET_ADD, family, dim, flags); write_unlock_bh(&set->lock); - /* Resize function must be called without holding any lock */ - if (ret == -EAGAIN - && set->variant->resize - && (ret = set->variant->resize(set, GFP_ATOMIC, retried++)) == 0) - goto retry; - return ret; } EXPORT_SYMBOL(ip_set_add); -- cgit v1.2.3