IB/hfi1: Allow remove MMU callbacks to free nodes
authorMitko Haralanov <mitko.haralanov@intel.com>
Tue, 8 Mar 2016 19:14:36 +0000 (11:14 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Mar 2016 19:55:21 +0000 (15:55 -0400)
commiteef9c896a94e715fcf8eb41e98b2469319641c73
tree982f983c66380726e0f1843face799708f52fc7d
parent4b00d9490f2147d29f107f36391b0cc77bcd944f
IB/hfi1: Allow remove MMU callbacks to free nodes

In order to allow the remove MMU callbacks to free the
RB nodes, it is necessary to prevent any references to
the nodes after the remove callback has been called.

Therefore, remove the node from the tree prior to calling
the callback. In other words, the MMU/RB API now guarantees
that all RB node operations it performs will be done prior
to calling the remove callback and that the RB node will
not be touched afterwards.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/mmu_rb.c