diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-26 07:50:56 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-26 07:50:56 +0100 |
commit | 986fb2e0532b1b0fa1e8312fbc38b9e7ed826547 (patch) | |
tree | e571ff6c8cd4bedfd49181125f0bd2993546ed24 /net/smc/smc_wr.c | |
parent | 24438e46268c721e14c5c888386af85c9e1c5db1 (diff) | |
parent | 2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff) |
Merge 4.20-rc4 into char-misc-next
We want the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/smc/smc_wr.c')
-rw-r--r-- | net/smc/smc_wr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/smc/smc_wr.c b/net/smc/smc_wr.c index 3c458d279855..c2694750a6a8 100644 --- a/net/smc/smc_wr.c +++ b/net/smc/smc_wr.c @@ -215,12 +215,14 @@ int smc_wr_tx_put_slot(struct smc_link *link, pend = container_of(wr_pend_priv, struct smc_wr_tx_pend, priv); if (pend->idx < link->wr_tx_cnt) { + u32 idx = pend->idx; + /* clear the full struct smc_wr_tx_pend including .priv */ memset(&link->wr_tx_pends[pend->idx], 0, sizeof(link->wr_tx_pends[pend->idx])); memset(&link->wr_tx_bufs[pend->idx], 0, sizeof(link->wr_tx_bufs[pend->idx])); - test_and_clear_bit(pend->idx, link->wr_tx_mask); + test_and_clear_bit(idx, link->wr_tx_mask); return 1; } |