Commit ee3707ae authored by Nagendra S Tomar's avatar Nagendra S Tomar Committed by Trond Myklebust

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: default avatarNagendra S Tomar <natomar@microsoft.com>
Fixes: b593c09f ("NFS: Improve handling of directory verifiers")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 6453bcd0
...@@ -866,6 +866,8 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc, ...@@ -866,6 +866,8 @@ static int nfs_readdir_xdr_to_array(struct nfs_readdir_descriptor *desc,
break; break;
} }
verf_arg = verf_res;
status = nfs_readdir_page_filler(desc, entry, pages, pglen, status = nfs_readdir_page_filler(desc, entry, pages, pglen,
arrays, narrays); arrays, narrays);
} while (!status && nfs_readdir_page_needs_filling(page)); } while (!status && nfs_readdir_page_needs_filling(page));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment