diff options
author | Coly Li <colyli@suse.de> | 2020-10-02 16:27:33 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-10-02 15:27:08 -0700 |
commit | 6aa25c737705466020e74ad44679d3758b8961f6 (patch) | |
tree | 53850a1b0dbaea770207e5375021f9213a082ecb /net/ceph | |
parent | fb25ebe1b212c37781b23a7f7cd21c0bb2f6eb83 (diff) | |
download | linux-6aa25c737705466020e74ad44679d3758b8961f6.tar.bz2 |
scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map()
In iscsci driver, iscsi_tcp_segment_map() uses the following code to
check whether the page should or not be handled by sendpage:
if (!recv && page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)))
The "page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)" part is to
make sure the page can be sent to network layer's zero copy path. This
part is exactly what sendpage_ok() does.
This patch uses use sendpage_ok() in iscsi_tcp_segment_map() to replace
the original open coded checks.
Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Vasily Averin <vvs@virtuozzo.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Chris Leech <cleech@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ceph')
0 files changed, 0 insertions, 0 deletions