Commit e6f689db authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: Use setup_timer

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9afdb00c
...@@ -297,9 +297,7 @@ static int __init ebt_ulog_init(void) ...@@ -297,9 +297,7 @@ static int __init ebt_ulog_init(void)
/* initialize ulog_buffers */ /* initialize ulog_buffers */
for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) { for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) {
init_timer(&ulog_buffers[i].timer); setup_timer(&ulog_buffers[i].timer, ulog_timer, i);
ulog_buffers[i].timer.function = ulog_timer;
ulog_buffers[i].timer.data = i;
spin_lock_init(&ulog_buffers[i].lock); spin_lock_init(&ulog_buffers[i].lock);
} }
......
...@@ -376,11 +376,8 @@ static int __init ipt_ulog_init(void) ...@@ -376,11 +376,8 @@ static int __init ipt_ulog_init(void)
} }
/* initialize ulog_buffers */ /* initialize ulog_buffers */
for (i = 0; i < ULOG_MAXNLGROUPS; i++) { for (i = 0; i < ULOG_MAXNLGROUPS; i++)
init_timer(&ulog_buffers[i].timer); setup_timer(&ulog_buffers[i].timer, ulog_timer, i);
ulog_buffers[i].timer.function = ulog_timer;
ulog_buffers[i].timer.data = i;
}
nflognl = netlink_kernel_create(NETLINK_NFLOG, ULOG_MAXNLGROUPS, NULL, nflognl = netlink_kernel_create(NETLINK_NFLOG, ULOG_MAXNLGROUPS, NULL,
THIS_MODULE); THIS_MODULE);
......
...@@ -353,9 +353,7 @@ nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, str ...@@ -353,9 +353,7 @@ nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, str
ipv6_addr_copy(&fq->saddr, src); ipv6_addr_copy(&fq->saddr, src);
ipv6_addr_copy(&fq->daddr, dst); ipv6_addr_copy(&fq->daddr, dst);
init_timer(&fq->timer); setup_timer(&fq->timer, nf_ct_frag6_expire, (unsigned long)fq);
fq->timer.function = nf_ct_frag6_expire;
fq->timer.data = (long) fq;
spin_lock_init(&fq->lock); spin_lock_init(&fq->lock);
atomic_set(&fq->refcnt, 1); atomic_set(&fq->refcnt, 1);
...@@ -870,8 +868,7 @@ int nf_ct_frag6_init(void) ...@@ -870,8 +868,7 @@ int nf_ct_frag6_init(void)
nf_ct_frag6_hash_rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ nf_ct_frag6_hash_rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^
(jiffies ^ (jiffies >> 6))); (jiffies ^ (jiffies >> 6)));
init_timer(&nf_ct_frag6_secret_timer); setup_timer(&nf_ct_frag6_secret_timer, nf_ct_frag6_secret_rebuild, 0);
nf_ct_frag6_secret_timer.function = nf_ct_frag6_secret_rebuild;
nf_ct_frag6_secret_timer.expires = jiffies nf_ct_frag6_secret_timer.expires = jiffies
+ nf_ct_frag6_secret_interval; + nf_ct_frag6_secret_interval;
add_timer(&nf_ct_frag6_secret_timer); add_timer(&nf_ct_frag6_secret_timer);
......
...@@ -620,9 +620,8 @@ __nf_conntrack_alloc(const struct nf_conntrack_tuple *orig, ...@@ -620,9 +620,8 @@ __nf_conntrack_alloc(const struct nf_conntrack_tuple *orig,
conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig;
conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl; conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl;
/* Don't set timer yet: wait for confirmation */ /* Don't set timer yet: wait for confirmation */
init_timer(&conntrack->timeout); setup_timer(&conntrack->timeout, death_by_timeout,
conntrack->timeout.data = (unsigned long)conntrack; (unsigned long)conntrack);
conntrack->timeout.function = death_by_timeout;
read_unlock_bh(&nf_ct_cache_lock); read_unlock_bh(&nf_ct_cache_lock);
return conntrack; return conntrack;
......
...@@ -290,9 +290,7 @@ static void nf_conntrack_expect_insert(struct nf_conntrack_expect *exp) ...@@ -290,9 +290,7 @@ static void nf_conntrack_expect_insert(struct nf_conntrack_expect *exp)
master_help->expecting++; master_help->expecting++;
list_add(&exp->list, &nf_conntrack_expect_list); list_add(&exp->list, &nf_conntrack_expect_list);
init_timer(&exp->timeout); setup_timer(&exp->timeout, expectation_timed_out, (unsigned long)exp);
exp->timeout.data = (unsigned long)exp;
exp->timeout.function = expectation_timed_out;
exp->timeout.expires = jiffies + master_help->helper->timeout * HZ; exp->timeout.expires = jiffies + master_help->helper->timeout * HZ;
add_timer(&exp->timeout); add_timer(&exp->timeout);
......
...@@ -158,10 +158,7 @@ instance_create(u_int16_t group_num, int pid) ...@@ -158,10 +158,7 @@ instance_create(u_int16_t group_num, int pid)
/* needs to be two, since we _put() after creation */ /* needs to be two, since we _put() after creation */
atomic_set(&inst->use, 2); atomic_set(&inst->use, 2);
init_timer(&inst->timer); setup_timer(&inst->timer, nfulnl_timer, (unsigned long)inst);
inst->timer.function = nfulnl_timer;
inst->timer.data = (unsigned long)inst;
/* don't start timer yet. (re)start it with every packet */
inst->peer_pid = pid; inst->peer_pid = pid;
inst->group_num = group_num; inst->group_num = group_num;
......
...@@ -216,10 +216,8 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family) ...@@ -216,10 +216,8 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family)
hinfo->pde->proc_fops = &dl_file_ops; hinfo->pde->proc_fops = &dl_file_ops;
hinfo->pde->data = hinfo; hinfo->pde->data = hinfo;
init_timer(&hinfo->timer); setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo);
hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval); hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval);
hinfo->timer.data = (unsigned long )hinfo;
hinfo->timer.function = htable_gc;
add_timer(&hinfo->timer); add_timer(&hinfo->timer);
spin_lock_bh(&hashlimit_lock); spin_lock_bh(&hashlimit_lock);
......
Markdown is supported
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