mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-14 09:47:20 +00:00
Revert "tun: call dev_get_valid_name() before register_netdevice()"
This reverts commit 0ad646c81b2182f7fa67ec0c8c825e0ee165696d. As noticed by Jakub, this is no longer needed after commit 11fc7d5a0a2d ("tun: fix memory leak in error path") This no longer exports dev_get_valid_name() for the exclusive use of tun driver. Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
This commit is contained in:
parent
6ea67769ff
commit
bacb7e1855
@ -2788,9 +2788,6 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
|
|||||||
|
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
err = dev_get_valid_name(net, dev, name);
|
|
||||||
if (err < 0)
|
|
||||||
goto err_free_dev;
|
|
||||||
|
|
||||||
dev_net_set(dev, net);
|
dev_net_set(dev, net);
|
||||||
dev->rtnl_link_ops = &tun_link_ops;
|
dev->rtnl_link_ops = &tun_link_ops;
|
||||||
|
@ -4113,9 +4113,6 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
|
|||||||
unsigned char name_assign_type,
|
unsigned char name_assign_type,
|
||||||
void (*setup)(struct net_device *),
|
void (*setup)(struct net_device *),
|
||||||
unsigned int txqs, unsigned int rxqs);
|
unsigned int txqs, unsigned int rxqs);
|
||||||
int dev_get_valid_name(struct net *net, struct net_device *dev,
|
|
||||||
const char *name);
|
|
||||||
|
|
||||||
#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
|
#define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
|
||||||
alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
|
alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
|
||||||
|
|
||||||
|
@ -1249,8 +1249,8 @@ int dev_alloc_name(struct net_device *dev, const char *name)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dev_alloc_name);
|
EXPORT_SYMBOL(dev_alloc_name);
|
||||||
|
|
||||||
int dev_get_valid_name(struct net *net, struct net_device *dev,
|
static int dev_get_valid_name(struct net *net, struct net_device *dev,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
BUG_ON(!net);
|
BUG_ON(!net);
|
||||||
|
|
||||||
@ -1266,7 +1266,6 @@ int dev_get_valid_name(struct net *net, struct net_device *dev,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dev_get_valid_name);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dev_change_name - change name of a device
|
* dev_change_name - change name of a device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user