[PATCH rdma-next v1 1/3] RDMA/core: Avoid freeing netdevs in disable_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Parav Pandit <parav@xxxxxxxxxxxx>

To use disable_device() helper during changing net namespace of rdma
device in subsequent patch, move free_netdevs() out of it.

Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
---
 drivers/infiniband/core/device.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 2dbd04739ac6..55fccbb0aabd 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1149,9 +1149,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);
 }

 /*
@@ -1294,6 +1291,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);
--
2.20.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux