diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
commit | 4958134df54c2c84e9c22ea042761d439164d26e (patch) | |
tree | 503177afab11f7d25b12a84ce25b481d305c51ba /drivers/infiniband/sw/rdmavt/mr.c | |
parent | c4f528795d1add8b63652673f7262729f679c6c1 (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) |
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/mr.c')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/mr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c index 1b2e5362a3ff..cc429b567d0a 100644 --- a/drivers/infiniband/sw/rdmavt/mr.c +++ b/drivers/infiniband/sw/rdmavt/mr.c | |||
@@ -489,11 +489,13 @@ static int rvt_check_refs(struct rvt_mregion *mr, const char *t) | |||
489 | unsigned long timeout; | 489 | unsigned long timeout; |
490 | struct rvt_dev_info *rdi = ib_to_rvt(mr->pd->device); | 490 | struct rvt_dev_info *rdi = ib_to_rvt(mr->pd->device); |
491 | 491 | ||
492 | if (percpu_ref_is_zero(&mr->refcount)) | 492 | if (mr->lkey) { |
493 | return 0; | 493 | /* avoid dma mr */ |
494 | /* avoid dma mr */ | ||
495 | if (mr->lkey) | ||
496 | rvt_dereg_clean_qps(mr); | 494 | rvt_dereg_clean_qps(mr); |
495 | /* @mr was indexed on rcu protected @lkey_table */ | ||
496 | synchronize_rcu(); | ||
497 | } | ||
498 | |||
497 | timeout = wait_for_completion_timeout(&mr->comp, 5 * HZ); | 499 | timeout = wait_for_completion_timeout(&mr->comp, 5 * HZ); |
498 | if (!timeout) { | 500 | if (!timeout) { |
499 | rvt_pr_err(rdi, | 501 | rvt_pr_err(rdi, |