diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-02-24 10:59:37 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-02-28 10:11:32 -0500 |
commit | 64cfca85bacde54caa64e0ab855c48734894fa37 (patch) | |
tree | 0ff9768007b09b52f98985cc593de36750db7afc /fs/nfs/nfs2xdr.c | |
parent | b38e09b9b613ee608c87bc00979db891ee9f0538 (diff) | |
download | lwn-64cfca85bacde54caa64e0ab855c48734894fa37.tar.gz lwn-64cfca85bacde54caa64e0ab855c48734894fa37.zip |
NFS: Return valid errors from nfs2/3_decode_dirent()
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>
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r-- | fs/nfs/nfs2xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 7fba7711e6b3..3d5ba43f44bb 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -949,7 +949,7 @@ int nfs2_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, error = decode_filename_inline(xdr, &entry->name, &entry->len); if (unlikely(error)) - return error; + return -EAGAIN; /* * The type (size and byte order) of nfscookie isn't defined in |