Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3042492b authored by Parav Pandit's avatar Parav Pandit Committed by Jason Gunthorpe
Browse files

RDMA/core: Avoid freeing netdevs in disable_device()



So we can use the disable_device() helper while changing the net namespace
of the rdma device in a subsequent patch, move free_netdevs() out of it.

Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 2d959849
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1152,9 +1152,6 @@ static void disable_device(struct ib_device *device)
	 * devices and before device is disabled.
	 */
	remove_compat_devs(device);

	/* Expedite removing unregistered pointers from the hash table */
	free_netdevs(device);
}

/*
@@ -1297,6 +1294,10 @@ static void __ib_unregister_device(struct ib_device *ib_dev)
		goto out;

	disable_device(ib_dev);

	/* Expedite removing unregistered pointers from the hash table */
	free_netdevs(ib_dev);

	ib_device_unregister_sysfs(ib_dev);
	device_del(&ib_dev->dev);
	ib_device_unregister_rdmacg(ib_dev);