summaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorNagendra S Tomar <natomar@microsoft.com>2021-03-16 11:25:14 +0100
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-04-05 15:04:20 +0200
commitee3707ae2c1f1327ad5188836b7ab62ed2c93b28 (patch)
treebe81083b660274d9f64504bbbcec0d24526ade12 /fs/nfs/dir.c
parentNFS: Fix up incorrect documentation (diff)
downloadlinux-ee3707ae2c1f1327ad5188836b7ab62ed2c93b28.tar.xz
linux-ee3707ae2c1f1327ad5188836b7ab62ed2c93b28.zip
nfs: Subsequent READDIR calls should carry non-zero cookieverifier
If the loop in nfs_readdir_xdr_to_array() runs more than once, subsequent READDIR RPCs may wrongly carry a zero cookie verifier and non-zero cookie. Make sure subsequent calls to READDIR carry the cookie verifier returned by the first call. Signed-off-by: Nagendra S Tomar <natomar@microsoft.com> Fixes: b593c09f83a2 ("NFS: Improve handling of directory verifiers") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index fc4f490f2d78..08a1e2e31d0b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -866,6 +866,8 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc,
break;
}
+ verf_arg = verf_res;
+
status = nfs_readdir_page_filler(desc, entry, pages, pglen,
arrays, narrays);
} while (!status && nfs_readdir_page_needs_filling(page));