ipv4: avoid a test in ip_rt_put()
authorEric Dumazet <edumazet@google.com>
Sun, 28 Oct 2012 22:33:23 +0000 (22:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2012 18:59:04 +0000 (14:59 -0400)
commit6da025fa23bb10c82f80de319c837ed2b02306e4
tree64992521a7fa74c04eff45fffc88dd56dfb10ba7
parentb26ddd813031666293c95e84c997eb8b1f97bd38
ipv4: avoid a test in ip_rt_put()

We can save a test in ip_rt_put(), considering dst_release() accepts
a NULL parameter, and dst is first element in rtable.

Add a BUILD_BUG_ON() to catch any change that could break this
assertion.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Cong Wang <amwang@redhat.com>
Acked-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h