These lines could be aggregated to one line because fib6_new_table() calls fib6_get_table() inside on both cases CONFIG_IPV6_MULTIPLE_TABLES is enabled or not.
Signed-off-by: Masashi Honma <masashi.ho...@gmail.com> --- net/ipv6/route.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index cb32ce2..1ff4130 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1778,16 +1778,7 @@ int ip6_route_info_create(struct fib6_config *cfg, struct rt6_info **rt_ret) cfg->fc_metric = IP6_RT_PRIO_USER; err = -ENOBUFS; - if (cfg->fc_nlinfo.nlh && - !(cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_CREATE)) { - table = fib6_get_table(net, cfg->fc_table); - if (!table) { - pr_warn("NLM_F_CREATE should be specified when creating new route\n"); - table = fib6_new_table(net, cfg->fc_table); - } - } else { - table = fib6_new_table(net, cfg->fc_table); - } + table = fib6_new_table(net, cfg->fc_table); if (!table) goto out; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html