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:
Dean Luick 2016-07-28 15:21:16 -04:00 committed by Doug Ledford
parent 9ff73c8715
commit a383f8ec55

View File

@ -1239,6 +1239,7 @@ retry:
list_del(&node->list);
pq->n_locked -= node->npages;
spin_unlock(&pq->evict_lock);
iovec->node = NULL;
goto bail;
}
return 0;