-
由 Prabhakar Kushwaha 提交于
dev_get_by_name() finds network device by name but it also increases the reference count. If a nvme-tcp queue is present and the network device driver is removed before nvme_tcp, we will face the following continuous log: "kernel:unregister_netdevice: waiting for <eth> to become free. Usage count = 2" And rmmod further halts. Similar case arises during reboot/shutdown with nvme-tcp queue present and both never completes. To fix this, use __dev_get_by_name() which finds network device by name without increasing any reference counter. Fixes: 3ede8f72 ("nvme-tcp: allow selecting the network interface for connections") Signed-off-by: NOmkar Kulkarni <okulkarni@marvell.com> Signed-off-by: NShai Malin <smalin@marvell.com> Signed-off-by: NPrabhakar Kushwaha <pkushwaha@marvell.com> Reviewed-by: NSagi Grimberg <sagi@grimberg.me> [hch: remove the ->ndev member entirely] Signed-off-by: NChristoph Hellwig <hch@lst.de>
8b43ced6