From 62a3d29539aa109fed1c8a20d63ef95948b13842 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 23 Aug 2010 16:48:14 +0200 Subject: Cleanup, compatibility - 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. --- kernel/ip_set_hash_ipport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/ip_set_hash_ipport.c') 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; -- cgit v1.2.3