File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,10 @@ static void cma_release_dev(struct rdma_id_private *id_priv)
477477 list_del (& id_priv -> list );
478478 cma_dev_put (id_priv -> cma_dev );
479479 id_priv -> cma_dev = NULL ;
480+ if (id_priv -> id .route .addr .dev_addr .sgid_attr ) {
481+ rdma_put_gid_attr (id_priv -> id .route .addr .dev_addr .sgid_attr );
482+ id_priv -> id .route .addr .dev_addr .sgid_attr = NULL ;
483+ }
480484 mutex_unlock (& lock );
481485}
482486
@@ -1861,9 +1865,6 @@ static void _destroy_id(struct rdma_id_private *id_priv,
18611865
18621866 kfree (id_priv -> id .route .path_rec );
18631867
1864- if (id_priv -> id .route .addr .dev_addr .sgid_attr )
1865- rdma_put_gid_attr (id_priv -> id .route .addr .dev_addr .sgid_attr );
1866-
18671868 put_net (id_priv -> id .route .addr .dev_addr .net );
18681869 rdma_restrack_del (& id_priv -> res );
18691870 kfree (id_priv );
You can’t perform that action at this time.
0 commit comments