@@ -30,6 +30,7 @@
*/
#include <linux/nfs_fs.h>
+#include <linux/nfs_page.h>
#include "internal.h"
#include "nfs4filelayout.h"
@@ -672,7 +673,8 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
u64 p_stripe, r_stripe;
u32 stripe_unit;
- if (!pnfs_generic_pg_test(pgio, prev, req))
+ if (!pnfs_generic_pg_test(pgio, prev, req) ||
+ !nfs_generic_pg_test(pgio, prev, req))
return false;
p_stripe = (u64)prev->wb_index << PAGE_CACHE_SHIFT;
@@ -218,6 +218,7 @@ bool nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, struct nfs_page *pr
return desc->pg_count + req->wb_bytes <= desc->pg_bsize;
}
+EXPORT_SYMBOL_GPL(nfs_generic_pg_test);
/**
* nfs_pageio_init - initialise a page io descriptor
Otherwise we end up overflowing the rpc buffer size on the receive end. This bug was introduced in v3.0. Signed-off-by: Benny Halevy <benny@tonian.com> --- fs/nfs/nfs4filelayout.c | 4 +++- fs/nfs/pagelist.c | 1 + 2 files changed, 4 insertions(+), 1 deletions(-)