]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Fix srp_map_sg_fr()
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 1 Dec 2015 18:19:38 +0000 (10:19 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 7 Dec 2015 22:20:11 +0000 (17:20 -0500)
commit9d9062bc0bcdaa97f11354ce3e1ad5f922dad7a7
treed0caf2ef59d4965133b244945afb1c81d135b1dc
parentca3d158903d828eba72c7f44f238ac1f5e907b0b
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 51c9d7a9d376 ("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>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h