summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-09-11 11:14:06 +0800
committerSasha Levin <sasha.levin@oracle.com>2015-10-27 22:13:39 -0400
commitf67da13760a0be601a1d3b3daef030c2e5e7cdec (patch)
tree18ca5c905a2fc7d41747e28f1beaccf0587f4a37 /fs
parent8bf6c729a8b9ecb4c2dccba2881b9a374daae7a2 (diff)
nfs: fix pg_test page count calculation
[ Upstream commit 048883e0b934d9a5103d40e209cb14b7f33d2933 ] We really want sizeof(struct page *) instead. Otherwise we limit maximum IO size to 64 pages rather than 512 pages on a 64bit system. Fixes 2e11f829(nfs: cap request size to fit a kmalloced page array). Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Fixes: 2e11f8296d22 ("nfs: cap request size to fit a kmalloced page array") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/pagelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 92dd2ec8592f..54631609d601 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -486,7 +486,7 @@ size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
* for it without upsetting the slab allocator.
*/
if (((desc->pg_count + req->wb_bytes) >> PAGE_SHIFT) *
- sizeof(struct page) > PAGE_SIZE)
+ sizeof(struct page *) > PAGE_SIZE)
return 0;
return min(desc->pg_bsize - desc->pg_count, (size_t)req->wb_bytes);