From: Masashi Honma <masashi.honma@gmail.com>
To: netdev@vger.kernel.org
Cc: Masashi Honma <masashi.honma@gmail.com>
Subject: [PATCH] ipv6 route: Aggregate table getting code
Date: Sun, 18 Oct 2015 09:51:39 +0900 [thread overview]
Message-ID: <1445129499-2496-1-git-send-email-masashi.honma@gmail.com> (raw)
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.honma@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
next reply other threads:[~2015-10-18 0:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 0:51 Masashi Honma [this message]
2015-10-19 6:09 ` [PATCH] ipv6 route: Aggregate table getting code David Miller
2015-10-25 2:42 ` Masashi Honma
2015-10-25 2:44 ` [PATCH] ipv6 route: Use flag instead of calling fib6_get_table() twice Masashi Honma
2015-10-27 5:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445129499-2496-1-git-send-email-masashi.honma@gmail.com \
--to=masashi.honma@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).