]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:58:06 +0000 (11:58 +0200)
commitf79744cbee8b9ceea374a1c0d34d779ef0e2f842
treeb0562f7cb95127570d2e6ecf1091369abf087a52
parenta5244981310210e22fdcd507a39cebb43ed755e7
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>
fs/nfs/nfs2xdr.c
fs/nfs/nfs3xdr.c