net: remove the new_ifindex argument from dev_change_net_namespace
Here is only one place where we want to specify new_ifindex. In all
other cases, callers pass 0 as new_ifindex. It looks reasonable to add a
low-level function with new_ifindex and to convert
dev_change_net_namespace to a static inline wrapper.
Fixes: eeb85a14ee ("net: Allow to specify ifindex when device is moved to another namespace")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7e4a51319d
commit
0854fa82c9
@@ -4026,8 +4026,14 @@ void __dev_notify_flags(struct net_device *, unsigned int old_flags,
|
||||
int dev_change_name(struct net_device *, const char *);
|
||||
int dev_set_alias(struct net_device *, const char *, size_t);
|
||||
int dev_get_alias(const struct net_device *, char *, size_t);
|
||||
int __dev_change_net_namespace(struct net_device *dev, struct net *net,
|
||||
const char *pat, int new_ifindex);
|
||||
static inline
|
||||
int dev_change_net_namespace(struct net_device *dev, struct net *net,
|
||||
const char *pat, int new_ifindex);
|
||||
const char *pat)
|
||||
{
|
||||
return __dev_change_net_namespace(dev, net, pat, 0);
|
||||
}
|
||||
int __dev_set_mtu(struct net_device *, int);
|
||||
int dev_validate_mtu(struct net_device *dev, int mtu,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
||||
Reference in New Issue
Block a user