summaryrefslogtreecommitdiff
path: root/fs/nfs/pagelist.c
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2017-06-09 18:03:23 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 22:58:06 +0300
commit2eb3aea7d9c43325a12df312adfc7fb25bbd636b (patch)
tree7144d3907b09c5a2df836b73b6a5baed3ade6491 /fs/nfs/pagelist.c
parent1a4edf0f46b0cb87dd5020481d355cd5cc456c47 (diff)
downloadlinux-2eb3aea7d9c43325a12df312adfc7fb25bbd636b.tar.xz
NFS: Fix initialization of nfs_page_array->npages
Commit 8ef9b0b9e1c0 open-coded nfs_pgarray_set(), and left out the initialization of the nfs_page_array's npages. This mistake didn't show up until testing with block layouts, and there shows that all pNFS reads return -EIO. Fixes: 8ef9b0b9e1c0 ("NFS: move nfs_pgarray_set() to open code") Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 83d2918f1b13..8a23e2b40b04 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -779,6 +779,7 @@ int nfs_generic_pgio(struct nfs_pageio_descriptor *desc,
gfp_t gfp_flags = GFP_KERNEL;
pagecount = nfs_page_array_len(mirror->pg_base, mirror->pg_count);
+ pg_array->npages = pagecount;
if (pagecount <= ARRAY_SIZE(pg_array->page_array))
pg_array->pagevec = pg_array->page_array;