linux_dsm_epyc7002/drivers/block
Coly Li fb25ebe1b2 drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()
In _drbd_send_page() a page is checked by following code before sending
it by kernel_sendpage(),
        (page_count(page) < 1) || PageSlab(page)
If the check is true, this page won't be send by kernel_sendpage() and
handled by sock_no_sendpage().

This kind of check is exactly what macro sendpage_ok() does, which is
introduced into include/linux/net.h to solve a similar send page issue
in nvme-tcp code.

This patch uses macro sendpage_ok() to replace the open coded checks to
page type and refcount in _drbd_send_page(), as a code cleanup.

Signed-off-by: Coly Li <colyli@suse.de>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-10-02 15:27:08 -07:00
..
aoe treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
drbd drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage() 2020-10-02 15:27:08 -07:00
mtip32xx
paride treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rnbd block/rnbd: Ensure err is always initialized in process_rdma 2020-08-21 17:09:11 -06:00
rsxx treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen-blkback treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
zram
amiflop.c
ataflop.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
brd.c
cryptoloop.c
floppy.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig
loop.c block-5.9-2020-08-28 2020-08-28 16:38:29 -07:00
loop.h
Makefile
nbd.c nbd: restore default timeout when setting it to zero 2020-08-26 09:08:49 -06:00
null_blk_main.c null_blk: fix passing of REQ_FUA flag in null_handle_rq 2020-08-21 17:14:28 -06:00
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c
null_blk.h
pktcdvd.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ps3disk.c
ps3vram.c
rbd_types.h
rbd.c rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-07 13:14:30 +02:00
skd_main.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
skd_s1120.h
sunvdc.c
swim3.c
swim_asm.S
swim.c
sx8.c
umem.c
umem.h
virtio_blk.c block: virtio_blk: fix handling single range discard request 2020-08-17 06:59:41 -07:00
xen-blkfront.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xsysace.c
z2ram.c