nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 30 Sep 2021 19:44:41 +0000 (15:44 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 30 Sep 2021 20:53:17 +0000 (16:53 -0400)
commitf2e717d655040d632c9015f19aa4275f8b16e7f2
treee94de61245fb6108c742ca1ba6fca97e81605c41
parent1d625050c7c2dd877e108e382b8aaf1ae3cfe1f4
nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero

RFC3530 notes that the 'dircount' field may be zero, in which case the
recommendation is to ignore it, and only enforce the 'maxcount' field.
In RFC5661, this recommendation to ignore a zero valued field becomes a
requirement.

Fixes: aee377644146 ("nfsd4: fix rd_dircount enforcement")
Cc: <stable@vger.kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c