Commit 5fdb5f69 authored by Jozsef Kadlecsik's avatar Jozsef Kadlecsik
Browse files

netfilter: ipset: Remove redundant mtype_expire() arguments

Remove redundant parameters nets_length and dsize, because
they can be get from other parameters.

Ported from a patch proposed by Sergey Popovich <>.

Signed-off-by: default avatarJozsef Kadlecsik <>
parent 9e41f26a
......@@ -465,14 +465,15 @@ mtype_same_set(const struct ip_set *a, const struct ip_set *b)
/* Delete expired elements from the hashtable */
static void
mtype_expire(struct ip_set *set, struct htype *h, u8 nets_length, size_t dsize)
mtype_expire(struct ip_set *set, struct htype *h)
struct htable *t;
struct hbucket *n, *tmp;
struct mtype_elem *data;
u32 i, j, d;
size_t dsize = set->dsize;
u8 k;
u8 k, nets_length = NLEN(set->family);
t = ipset_dereference_protected(h->table, set);
......@@ -539,7 +540,7 @@ mtype_gc(unsigned long ul_set)
mtype_expire(set, h, NLEN(set->family), set->dsize);
mtype_expire(set, h);
h->gc.expires = jiffies + IPSET_GC_PERIOD(set->timeout) * HZ;
......@@ -715,7 +716,7 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext,
if (set->elements >= h->maxelem) {
/* FIXME: when set is full, we slow down here */
mtype_expire(set, h, NLEN(set->family), set->dsize);
mtype_expire(set, h);
if (set->elements >= h->maxelem && SET_WITH_FORCEADD(set))
forceadd = true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment