diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-12-09 12:04:19 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-09 13:23:02 -0800 |
commit | 3150a73366b64e3109f0facbc98bcacbc14e81ba (patch) | |
tree | 2b94b32c5fe97a4e76058a6f65e8c5717b53ee16 /net/core/devlink.c | |
parent | 1a2fb220edca98d18f90e3ef5bd6853a6b22b1b8 (diff) | |
parent | ded746bfc94398d2ee9de315a187677b207b2004 (diff) | |
download | linux-stable-3150a73366b64e3109f0facbc98bcacbc14e81ba.tar.gz linux-stable-3150a73366b64e3109f0facbc98bcacbc14e81ba.tar.bz2 linux-stable-3150a73366b64e3109f0facbc98bcacbc14e81ba.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r-- | net/core/devlink.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index db3b52110cf2..0a9349a02cad 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4139,14 +4139,6 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) return err; } - if (info->attrs[DEVLINK_ATTR_NETNS_PID] || - info->attrs[DEVLINK_ATTR_NETNS_FD] || - info->attrs[DEVLINK_ATTR_NETNS_ID]) { - dest_net = devlink_netns_get(skb, info); - if (IS_ERR(dest_net)) - return PTR_ERR(dest_net); - } - if (info->attrs[DEVLINK_ATTR_RELOAD_ACTION]) action = nla_get_u8(info->attrs[DEVLINK_ATTR_RELOAD_ACTION]); else @@ -4189,6 +4181,14 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) return -EINVAL; } } + if (info->attrs[DEVLINK_ATTR_NETNS_PID] || + info->attrs[DEVLINK_ATTR_NETNS_FD] || + info->attrs[DEVLINK_ATTR_NETNS_ID]) { + dest_net = devlink_netns_get(skb, info); + if (IS_ERR(dest_net)) + return PTR_ERR(dest_net); + } + err = devlink_reload(devlink, dest_net, action, limit, &actions_performed, info->extack); if (dest_net) |