summary refs log tree commit diff
path: root/net/rds/message.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-02-04 14:53:42 -0700
committerJason Gunthorpe <jgg@mellanox.com>2019-02-04 14:53:42 -0700
commit6a8a2aa62da2fbe51f5449993fd366398048f465 (patch)
tree566c6fcc782eefbca054af8553371d09b9d0734c /net/rds/message.c
parenta163afc88556e099271a7b423295bc5176fcecce (diff)
parent8834f5600cf3c8db365e18a3d5cac2c2780c81e5 (diff)
downloadlinux-6a8a2aa62da2fbe51f5449993fd366398048f465.tar.gz
Merge tag 'v5.0-rc5' into rdma.git for-next
Linux 5.0-rc5

Needed to merge the include/uapi changes so we have an up to date
single-tree for these files. Patches already posted are also expected to
need this for dependencies.
Diffstat (limited to 'net/rds/message.c')
-rw-r--r--net/rds/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/message.c b/net/rds/message.c
index f139420ba1f6..50f13f1d4ae0 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -341,7 +341,7 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in
 {
 	struct rds_message *rm;
 	unsigned int i;
-	int num_sgs = ceil(total_len, PAGE_SIZE);
+	int num_sgs = DIV_ROUND_UP(total_len, PAGE_SIZE);
 	int extra_bytes = num_sgs * sizeof(struct scatterlist);
 	int ret;
 
@@ -351,7 +351,7 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in
 
 	set_bit(RDS_MSG_PAGEVEC, &rm->m_flags);
 	rm->m_inc.i_hdr.h_len = cpu_to_be32(total_len);
-	rm->data.op_nents = ceil(total_len, PAGE_SIZE);
+	rm->data.op_nents = DIV_ROUND_UP(total_len, PAGE_SIZE);
 	rm->data.op_sg = rds_message_alloc_sgs(rm, num_sgs, &ret);
 	if (!rm->data.op_sg) {
 		rds_message_put(rm);