NFS: Return valid errors from nfs2/3_decode_dirent()
BugLink: https://bugs.launchpad.net/bugs/1969110
[ 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>
(cherry picked from commit
18dc19571210ca5a8b505234719f6b6c61c2b2a8)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>