IB/hfi1: Release node on insert failure
If unable to insert node into the RB tree cache, node will be freed before returning from the function. Null out iovec's pointer to node so iovec does not try to free it later. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
9ff73c8715
commit
a383f8ec55
|
@ -1239,6 +1239,7 @@ static int pin_vector_pages(struct user_sdma_request *req,
|
||||||
list_del(&node->list);
|
list_del(&node->list);
|
||||||
pq->n_locked -= node->npages;
|
pq->n_locked -= node->npages;
|
||||||
spin_unlock(&pq->evict_lock);
|
spin_unlock(&pq->evict_lock);
|
||||||
|
iovec->node = NULL;
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue