[3.16.y-ckt stable] Patch "nfs: fix pg_test page count calculation" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Mon Oct 26 21:14:59 UTC 2015
This is a note to let you know that I have just added a patch titled
nfs: fix pg_test page count calculation
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.19.8-ckt9.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From be113e07662ab3d581b7a98006899853071bd201 Mon Sep 17 00:00:00 2001
From: Peng Tao <tao.peng at primarydata.com>
Date: Fri, 11 Sep 2015 11:14:06 +0800
Subject: nfs: fix pg_test page count calculation
commit 048883e0b934d9a5103d40e209cb14b7f33d2933 upstream.
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 at lst.de>
Signed-off-by: Peng Tao <tao.peng at primarydata.com>
Fixes: 2e11f8296d22 ("nfs: cap request size to fit a kmalloced page array")
Signed-off-by: Trond Myklebust <trond.myklebust at primarydata.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
fs/nfs/pagelist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 227c53d..9544693 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -491,7 +491,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);
--
1.9.1
More information about the kernel-team
mailing list