summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-09-06 10:55:31 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-06 23:32:21 +0300
commitc715a39541bb399eb03d728a996b224d90ce1336 (patch)
tree260fb28284c2baa40a06cf9c5ca17beb891d5532
parent50704e039ab1d7e6c035d8c27a0b314929bfbe10 (diff)
downloadlinux-c715a39541bb399eb03d728a996b224d90ce1336.tar.xz
RDMA/core: Follow correct unregister order between sysfs and cgroup
During register_device() init sequence is, (a) register with rdma cgroup followed by (b) register with sysfs Therefore, unregister_device() sequence should follow the reverse order. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a0939140ed3a..e1155067954b 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -598,8 +598,8 @@ void ib_unregister_device(struct ib_device *device)
}
up_read(&lists_rwsem);
- ib_device_unregister_rdmacg(device);
ib_device_unregister_sysfs(device);
+ ib_device_unregister_rdmacg(device);
mutex_unlock(&device_mutex);