File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -649,9 +649,6 @@ void rdma_alloc_commit_uobject(struct ib_uobject *uobj,
649
649
{
650
650
struct ib_uverbs_file * ufile = attrs -> ufile ;
651
651
652
- /* alloc_commit consumes the uobj kref */
653
- uobj -> uapi_object -> type_class -> alloc_commit (uobj );
654
-
655
652
/* kref is held so long as the uobj is on the uobj list. */
656
653
uverbs_uobject_get (uobj );
657
654
spin_lock_irq (& ufile -> uobjects_lock );
@@ -661,6 +658,9 @@ void rdma_alloc_commit_uobject(struct ib_uobject *uobj,
661
658
/* matches atomic_set(-1) in alloc_uobj */
662
659
atomic_set (& uobj -> usecnt , 0 );
663
660
661
+ /* alloc_commit consumes the uobj kref */
662
+ uobj -> uapi_object -> type_class -> alloc_commit (uobj );
663
+
664
664
/* Matches the down_read in rdma_alloc_begin_uobject */
665
665
up_read (& ufile -> hw_destroy_rwsem );
666
666
}
You can’t perform that action at this time.
0 commit comments