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>
This commit is contained in:

committed by
David S. Miller

parent
10262b0b53
commit
eeb2c4fb6a
@@ -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;
|
||||
|
Reference in New Issue
Block a user