]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFS: Return valid errors from nfs2/3_decode_dirent()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 24 Feb 2022 15:59:37 +0000 (10:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:25 +0000 (14:40 +0200)
commit2f3885514e410a90123ee3b81b11529eb81efcea
treecf50356cf243d7f5a3f7d1e125b4446c27dfd5da
parent7b59afe84ad916906beb0ec7eb04918260d1c552
NFS: Return valid errors from nfs2/3_decode_dirent()

[ Upstream commit 64cfca85bacde54caa64e0ab855c48734894fa37 ]

Valid return values for decode_dirent() callback functions are:
 0: Success
 -EBADCOOKIE: End of directory
 -EAGAIN: End of xdr_stream

All errors need to map into one of those three values.

Fixes: 573c4e1ef53a ("NFS: Simplify ->decode_dirent() calling sequence")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c