Commit b5542849 authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust

NFS: use req_offset where appropriate

Signed-off-by: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent cd12ae32
...@@ -776,8 +776,8 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, ...@@ -776,8 +776,8 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
!nfs_generic_pg_test(pgio, prev, req)) !nfs_generic_pg_test(pgio, prev, req))
return false; return false;
p_stripe = (u64)prev->wb_index << PAGE_CACHE_SHIFT; p_stripe = (u64)req_offset(prev);
r_stripe = (u64)req->wb_index << PAGE_CACHE_SHIFT; r_stripe = (u64)req_offset(req);
stripe_unit = FILELAYOUT_LSEG(pgio->pg_lseg)->stripe_unit; stripe_unit = FILELAYOUT_LSEG(pgio->pg_lseg)->stripe_unit;
do_div(p_stripe, stripe_unit); do_div(p_stripe, stripe_unit);
...@@ -896,8 +896,7 @@ filelayout_choose_commit_list(struct nfs_page *req, ...@@ -896,8 +896,7 @@ filelayout_choose_commit_list(struct nfs_page *req,
* to store the value calculated in filelayout_write_pagelist * to store the value calculated in filelayout_write_pagelist
* and just use that here. * and just use that here.
*/ */
j = nfs4_fl_calc_j_index(lseg, j = nfs4_fl_calc_j_index(lseg, req_offset(req));
(loff_t)req->wb_index << PAGE_CACHE_SHIFT);
i = select_bucket_index(fl, j); i = select_bucket_index(fl, j);
buckets = FILELAYOUT_FROM_HDR(lseg->pls_layout)->commit_info.buckets; buckets = FILELAYOUT_FROM_HDR(lseg->pls_layout)->commit_info.buckets;
list = &buckets[i].written; list = &buckets[i].written;
......
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