summaryrefslogtreecommitdiffstats
path: root/net/rds/send.c
diff options
context:
space:
mode:
authorJacob Wen <jian.w.wen@oracle.com>2019-01-07 09:59:59 +0800
committerDavid S. Miller <davem@davemloft.net>2019-01-07 07:22:36 -0800
commiteeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5 (patch)
treea6a3fd94a38cd29cddb7b6ce6cf3f90fbf45f3ba /net/rds/send.c
parent10262b0b53666cbc506989b17a3ead1e9c3b43b4 (diff)
downloadlinux-stable-eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5.tar.gz
linux-stable-eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5.tar.bz2
linux-stable-eeb2c4fb6a3d0ebed35fbc13a255f691c8b8d7e5.zip
rds: use DIV_ROUND_UP instead of ceil
Yes indeed, DIV_ROUND_UP is in kernel.h. Signed-off-by: Jacob Wen <jian.w.wen@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r--net/rds/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/send.c b/net/rds/send.c
index 3d822bad7de9..fd8b687d5c05 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1107,7 +1107,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
size_t total_payload_len = payload_len, rdma_payload_len = 0;
bool zcopy = ((msg->msg_flags & MSG_ZEROCOPY) &&
sock_flag(rds_rs_to_sk(rs), SOCK_ZEROCOPY));
- int num_sgs = ceil(payload_len, PAGE_SIZE);
+ int num_sgs = DIV_ROUND_UP(payload_len, PAGE_SIZE);
int namelen;
struct rds_iov_vector_arr vct;
int ind;