Commit a383f8ec authored by Dean Luick's avatar Dean Luick Committed by Doug Ledford

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: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 9ff73c87
......@@ -1239,6 +1239,7 @@ static int pin_vector_pages(struct user_sdma_request *req,
list_del(&node->list);
pq->n_locked -= node->npages;
spin_unlock(&pq->evict_lock);
iovec->node = NULL;
goto bail;
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment