Commit 91b022ec authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

svcrdma: use offset_in_page() macro

Clean up: Use offset_in_page() macro instead of open-coding.
Reported-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 9450ca8e
...@@ -372,8 +372,9 @@ static void svc_rdma_pagelist_to_sg(struct svc_rdma_write_info *info, ...@@ -372,8 +372,9 @@ static void svc_rdma_pagelist_to_sg(struct svc_rdma_write_info *info,
struct scatterlist *sg; struct scatterlist *sg;
struct page **page; struct page **page;
page_off = (info->wi_next_off + xdr->page_base) & ~PAGE_MASK; page_off = info->wi_next_off + xdr->page_base;
page_no = (info->wi_next_off + xdr->page_base) >> PAGE_SHIFT; page_no = page_off >> PAGE_SHIFT;
page_off = offset_in_page(page_off);
page = xdr->pages + page_no; page = xdr->pages + page_no;
info->wi_next_off += remaining; info->wi_next_off += remaining;
sg = ctxt->rw_sg_table.sgl; sg = ctxt->rw_sg_table.sgl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment