summaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-04-14 03:56:35 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-26 12:23:23 -0400
commite5265a0c587423bbd21a6b39a572cecff16b9346 (patch)
tree0ed40a362520b8ac6d2c001ca5280fd240fdb555 /fs/nfs/pnfs.c
parent9526b2b6d6b9f183b66cf21c4afa6e79d5a14f44 (diff)
downloadop-kernel-dev-e5265a0c587423bbd21a6b39a572cecff16b9346.zip
op-kernel-dev-e5265a0c587423bbd21a6b39a572cecff16b9346.tar.gz
NFSv4.1 fix page number calculation bug for filelayout decode buffers
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index b5d4515..38512bc 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -587,7 +587,7 @@ send_layoutget(struct pnfs_layout_hdr *lo,
/* allocate pages for xdr post processing */
max_resp_sz = server->nfs_client->cl_session->fc_attrs.max_resp_sz;
- max_pages = max_resp_sz >> PAGE_SHIFT;
+ max_pages = nfs_page_array_len(0, max_resp_sz);
pages = kcalloc(max_pages, sizeof(struct page *), gfp_flags);
if (!pages)
OpenPOWER on IntegriCloud