diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-12-11 02:12:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:57:08 -0800 |
commit | 95c9382a345262637d3e5c7da5f09f0f46daa930 (patch) | |
tree | 2572e9c338dbab9517cdd6b61174477b117796f9 /net/ipv4/inet_timewait_sock.c | |
parent | 1f9e636ea21bd648a5cbd2f744a1d39a5e183b20 (diff) | |
download | kernel_goldelico_gta04-95c9382a345262637d3e5c7da5f09f0f46daa930.zip kernel_goldelico_gta04-95c9382a345262637d3e5c7da5f09f0f46daa930.tar.gz kernel_goldelico_gta04-95c9382a345262637d3e5c7da5f09f0f46daa930.tar.bz2 |
[INET]: Use BUILD_BUG_ON in inet_timewait_sock.c checks
Make the INET_TWDR_TWKILL_SLOTS vs sizeof(twdr->thread_slots)
check nicer.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index a60b99e..d43e787 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -194,16 +194,14 @@ out: EXPORT_SYMBOL_GPL(inet_twdr_hangman); -extern void twkill_slots_invalid(void); - void inet_twdr_twkill_work(struct work_struct *work) { struct inet_timewait_death_row *twdr = container_of(work, struct inet_timewait_death_row, twkill_work); int i; - if ((INET_TWDR_TWKILL_SLOTS - 1) > (sizeof(twdr->thread_slots) * 8)) - twkill_slots_invalid(); + BUILD_BUG_ON((INET_TWDR_TWKILL_SLOTS - 1) > + (sizeof(twdr->thread_slots) * 8)); while (twdr->thread_slots) { spin_lock_bh(&twdr->death_lock); |