diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2017-07-29 18:43:32 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-31 22:18:38 +0300 |
commit | e87473bc1b6c2cb08f1b760cfc8cd012822241a6 (patch) | |
tree | 8580ea74fd8e68d9e8d778439c4d83f7aa99788d /drivers/infiniband/hw/hfi1/user_exp_rcv.c | |
parent | 96603ed865b3c5a9a0d1c9ed434661519d49fde3 (diff) | |
download | linux-e87473bc1b6c2cb08f1b760cfc8cd012822241a6.tar.xz |
IB/hfi1: Only set fd pointer when base context is completely initialized
The allocate_ctxt() function adds the context to the fd data structure.
Since the context is not completely initialized, this can cause confusion
as to whether the context is valid or not.
Move the fd reference from allocate_ctxt() to setup_base_ctxt().
Update the necessary functions to be aware of this move.
Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/user_exp_rcv.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/user_exp_rcv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c index 3baf71944471..d9036ba3f4eb 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c @@ -104,9 +104,9 @@ static struct mmu_rb_ops tid_rb_ops = { * receive caching. This needs to be done after the context has * been configured with the eager/expected RcvEntry counts. */ -int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd) +int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd, + struct hfi1_ctxtdata *uctxt) { - struct hfi1_ctxtdata *uctxt = fd->uctxt; struct hfi1_devdata *dd = uctxt->dd; int ret = 0; |