summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2006-05-25 01:40:53 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:07 -0400
commit0d0b5cb36faf7002a11736032313f06d6f3d881c (patch)
treed767ae12fde00b553546aab9f5aa3e23cd86069d /include
parentbf3fcf89552f24657bcfb6a9d73cd167ebb496c6 (diff)
downloadop-kernel-dev-0d0b5cb36faf7002a11736032313f06d6f3d881c.zip
op-kernel-dev-0d0b5cb36faf7002a11736032313f06d6f3d881c.tar.gz
NFS: Optimize allocation of nfs_read/write_data structures
Clean up use of page_array, and fix an off-by-one error noticed by Tom Talpey which causes kmalloc calls in cases where using the page_array is sufficient. Test plan: Normal client functional testing with r/wsize=32768. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_xdr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index c483e23..e206c07 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -694,7 +694,7 @@ struct nfs_read_data {
#ifdef CONFIG_NFS_V4
unsigned long timestamp; /* For lease renewal */
#endif
- struct page *page_array[NFS_PAGEVEC_SIZE + 1];
+ struct page *page_array[NFS_PAGEVEC_SIZE];
};
struct nfs_write_data {
@@ -712,7 +712,7 @@ struct nfs_write_data {
#ifdef CONFIG_NFS_V4
unsigned long timestamp; /* For lease renewal */
#endif
- struct page *page_array[NFS_PAGEVEC_SIZE + 1];
+ struct page *page_array[NFS_PAGEVEC_SIZE];
};
struct nfs_access_entry;
OpenPOWER on IntegriCloud