diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2015-12-01 10:19:38 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-12-07 17:20:11 -0500 |
commit | 57b0be9c0fb0ba3a35683c6ce21db7162d6758c5 (patch) | |
tree | d0caf2ef59d4965133b244945afb1c81d135b1dc /drivers/infiniband/ulp/srp/ib_srp.h | |
parent | a745f4f410082fedc17be75e10e4098f300943db (diff) | |
download | linux-stable-57b0be9c0fb0ba3a35683c6ce21db7162d6758c5.tar.gz linux-stable-57b0be9c0fb0ba3a35683c6ce21db7162d6758c5.tar.bz2 linux-stable-57b0be9c0fb0ba3a35683c6ce21db7162d6758c5.zip |
IB/srp: Fix srp_map_sg_fr()
After dma_map_sg() has been called the return value of that function
must be used as the number of elements in the scatterlist instead of
scsi_sg_count().
Fixes: commit f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: stable <stable@vger.kernel.org> # v4.4+
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 87a2a919dc43..f6af531f9f32 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -300,10 +300,7 @@ struct srp_map_state { dma_addr_t base_dma_addr; u32 dma_len; u32 total_len; - union { - unsigned int npages; - int sg_nents; - }; + unsigned int npages; unsigned int nmdesc; unsigned int ndesc; }; |