]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: use sendpage_ok() in ceph_tcp_sendpage()
authorColy Li <colyli@suse.de>
Fri, 2 Oct 2020 08:27:34 +0000 (16:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 22:27:08 +0000 (15:27 -0700)
commitb42a32173df1711b8c0f82e1dde0362b9adb811f
treeb9afe6c323f391becaa8b69706659bfb58703bc2
parentdd58cd7fa2fb0a59541cf5491ab4d0032b25dc1a
libceph: use sendpage_ok() in ceph_tcp_sendpage()

In libceph, ceph_tcp_sendpage() does the following checks before handle
the page by network layer's zero copy sendpage method,
if (page_count(page) >= 1 && !PageSlab(page))

This check is exactly what sendpage_ok() does. This patch replace the
open coded checks by sendpage_ok() as a code cleanup.

Signed-off-by: Coly Li <colyli@suse.de>
Acked-by: Jeff Layton <jlayton@kernel.org>
Cc: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ceph/messenger.c