summaryrefslogtreecommitdiffstats
path: root/kernel/ip_set_hash_ipport.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-08-23 16:48:14 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-08-23 16:48:14 +0200
commit62a3d29539aa109fed1c8a20d63ef95948b13842 (patch)
tree46aa8b0dcc0d601a354031b477283ddf3f2bae1f /kernel/ip_set_hash_ipport.c
parent1b8c69e14d97bf5d0e973740c5802fdbf96f756d (diff)
Cleanup, compatibilityv5.0-pre7
- Use is_vmalloc_addr when freeing vmalloc or kmalloc-ed areas. Thus we can get rid of a flag and simplify some functions. - When checking "same" sets, ignore hash size, because resizing changes it. - 2.6.35 compatibility added. - Discuss backward/forward compatibilities in the README file.
Diffstat (limited to 'kernel/ip_set_hash_ipport.c')
-rw-r--r--kernel/ip_set_hash_ipport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ip_set_hash_ipport.c b/kernel/ip_set_hash_ipport.c
index f0274f9..8554c80 100644
--- a/kernel/ip_set_hash_ipport.c
+++ b/kernel/ip_set_hash_ipport.c
@@ -229,10 +229,10 @@ hash_ipport_same_set(const struct ip_set *a, const struct ip_set *b)
struct chash *x = a->data;
struct chash *y = b->data;
+ /* Resizing changes htable_bits, so we ignore it */
return x->maxelem == y->maxelem
&& x->timeout == y->timeout
&& x->proto == y->proto
- && x->htable_bits == y->htable_bits /* resizing ? */
&& x->array_size == y->array_size
&& x->chain_limit == y->chain_limit;
}
@@ -473,7 +473,7 @@ hash_ipport_create(struct ip_set *set, struct nlattr *head, int len, u32 flags)
h->timeout = IPSET_NO_TIMEOUT;
h->htable = ip_set_alloc(jhash_size(h->htable_bits) * sizeof(struct slist),
- GFP_KERNEL, &set->flags);
+ GFP_KERNEL);
if (!h->htable) {
kfree(h);
return -ENOMEM;