Skip to content

Commit c6c209c

Browse files
committed
NFSD: Remove NFSERR_EAGAIN
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: [email protected] Reviewed-by: NeilBrown <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 1f941b2 commit c6c209c

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
@@ -17,7 +17,6 @@ static const struct {
1717
{ NFSERR_NOENT, -ENOENT },
1818
{ NFSERR_IO, -EIO },
1919
{ NFSERR_NXIO, -ENXIO },
20-
/* { NFSERR_EAGAIN, -EAGAIN }, */
2120
{ NFSERR_ACCES, -EACCES },
2221
{ NFSERR_EXIST, -EEXIST },
2322
{ NFSERR_XDEV, -EXDEV },

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
15061506
(schedule_timeout(20*HZ) == 0)) {
15071507
finish_wait(&nn->nfsd_ssc_waitq, &wait);
15081508
kfree(work);
1509-
return nfserr_eagain;
1509+
return nfserr_jukebox;
15101510
}
15111511
finish_wait(&nn->nfsd_ssc_waitq, &wait);
15121512
goto try_again;

fs/nfsd/nfsd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ void nfsd_lockd_shutdown(void);
233233
#define nfserr_noent cpu_to_be32(NFSERR_NOENT)
234234
#define nfserr_io cpu_to_be32(NFSERR_IO)
235235
#define nfserr_nxio cpu_to_be32(NFSERR_NXIO)
236-
#define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN)
237236
#define nfserr_acces cpu_to_be32(NFSERR_ACCES)
238237
#define nfserr_exist cpu_to_be32(NFSERR_EXIST)
239238
#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);
@@ -52,7 +51,6 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX);
5251
{ NFSERR_NXIO, "NXIO" }, \
5352
{ ECHILD, "CHILD" }, \
5453
{ ETIMEDOUT, "TIMEDOUT" }, \
55-
{ NFSERR_EAGAIN, "AGAIN" }, \
5654
{ NFSERR_ACCES, "ACCES" }, \
5755
{ NFSERR_EXIST, "EXIST" }, \
5856
{ 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)