Skip to content

Commit 90c4cb1

Browse files
chucklevergregkh
authored andcommitted
NFSD: Remove NFSERR_EAGAIN
[ Upstream commit c6c209ceb87f64a6ceebe61761951dcbbf4a0baa ] I haven't found an NFSERR_EAGAIN in RFCs 1094, 1813, 7530, or 8881. None of these RFCs have an NFS status code that match the numeric value "11". Based on the meaning of the EAGAIN errno, I presume the use of this status in NFSD means NFS4ERR_DELAY. So replace the one usage of nfserr_eagain, and remove it from NFSD's NFS status conversion tables. As far as I can tell, NFSERR_EAGAIN has existed since the pre-git era, but was not actually used by any code until commit f4e44b3 ("NFSD: delay unmount source's export after inter-server copy completed."), at which time it become possible for NFSD to return a status code of 11 (which is not valid NFS protocol). Fixes: f4e44b3 ("NFSD: delay unmount source's export after inter-server copy completed.") Cc: stable@vger.kernel.org Reviewed-by: NeilBrown <neil@brown.name> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 249d45c commit 90c4cb1

5 files changed

Lines changed: 1 addition & 6 deletions

File tree

fs/nfs_common/common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ static const struct {
1616
{ NFSERR_NOENT, -ENOENT },
1717
{ NFSERR_IO, -errno_NFSERR_IO},
1818
{ NFSERR_NXIO, -ENXIO },
19-
/* { NFSERR_EAGAIN, -EAGAIN }, */
2019
{ NFSERR_ACCES, -EACCES },
2120
{ NFSERR_EXIST, -EEXIST },
2221
{ NFSERR_XDEV, -EXDEV },

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
13541354
(schedule_timeout(20*HZ) == 0)) {
13551355
finish_wait(&nn->nfsd_ssc_waitq, &wait);
13561356
kfree(work);
1357-
return nfserr_eagain;
1357+
return nfserr_jukebox;
13581358
}
13591359
finish_wait(&nn->nfsd_ssc_waitq, &wait);
13601360
goto try_again;

fs/nfsd/nfsd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ void nfsd_lockd_shutdown(void);
201201
#define nfserr_noent cpu_to_be32(NFSERR_NOENT)
202202
#define nfserr_io cpu_to_be32(NFSERR_IO)
203203
#define nfserr_nxio cpu_to_be32(NFSERR_NXIO)
204-
#define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN)
205204
#define nfserr_acces cpu_to_be32(NFSERR_ACCES)
206205
#define nfserr_exist cpu_to_be32(NFSERR_EXIST)
207206
#define nfserr_xdev cpu_to_be32(NFSERR_XDEV)

include/trace/misc/nfs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ TRACE_DEFINE_ENUM(NFSERR_PERM);
1616
TRACE_DEFINE_ENUM(NFSERR_NOENT);
1717
TRACE_DEFINE_ENUM(NFSERR_IO);
1818
TRACE_DEFINE_ENUM(NFSERR_NXIO);
19-
TRACE_DEFINE_ENUM(NFSERR_EAGAIN);
2019
TRACE_DEFINE_ENUM(NFSERR_ACCES);
2120
TRACE_DEFINE_ENUM(NFSERR_EXIST);
2221
TRACE_DEFINE_ENUM(NFSERR_XDEV);
@@ -53,7 +52,6 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX);
5352
{ NFSERR_NXIO, "NXIO" }, \
5453
{ ECHILD, "CHILD" }, \
5554
{ ETIMEDOUT, "TIMEDOUT" }, \
56-
{ NFSERR_EAGAIN, "AGAIN" }, \
5755
{ NFSERR_ACCES, "ACCES" }, \
5856
{ NFSERR_EXIST, "EXIST" }, \
5957
{ NFSERR_XDEV, "XDEV" }, \

include/uapi/linux/nfs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
NFSERR_NOENT = 2, /* v2 v3 v4 */
5050
NFSERR_IO = 5, /* v2 v3 v4 */
5151
NFSERR_NXIO = 6, /* v2 v3 v4 */
52-
NFSERR_EAGAIN = 11, /* v2 v3 */
5352
NFSERR_ACCES = 13, /* v2 v3 v4 */
5453
NFSERR_EXIST = 17, /* v2 v3 v4 */
5554
NFSERR_XDEV = 18, /* v3 v4 */

0 commit comments

Comments
 (0)