summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-09-11 11:14:06 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-09-17 15:48:23 -0400
commit048883e0b934d9a5103d40e209cb14b7f33d2933 (patch)
treef96c88dc05fceef2ff08fbe5470cc9a36310aa67 /fs/nfs
parenta41cbe86df3afbc82311a1640e20858c0cd7e065 (diff)
downloadop-kernel-dev-048883e0b934d9a5103d40e209cb14b7f33d2933.zip
op-kernel-dev-048883e0b934d9a5103d40e209cb14b7f33d2933.tar.gz
nfs: fix pg_test page count calculation
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>
Diffstat (limited to 'fs/nfs')
-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 7c5718b..fe3ddd2 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -508,7 +508,7 @@ size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
* for it without upsetting the slab allocator.
*/
if (((mirror->pg_count + req->wb_bytes) >> PAGE_SHIFT) *
- sizeof(struct page) > PAGE_SIZE)
+ sizeof(struct page *) > PAGE_SIZE)
return 0;
return min(mirror->pg_bsize - mirror->pg_count, (size_t)req->wb_bytes);
OpenPOWER on IntegriCloud