diff options
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 4 | ||||
-rw-r--r-- | fs/nfsd/nfsd.h | 1 | ||||
-rw-r--r-- | fs/nfsd/nfsproc.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index f0695e815f0e..844960fd0395 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -524,13 +524,13 @@ idmap_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen | |||
524 | int ret; | 524 | int ret; |
525 | 525 | ||
526 | if (namelen + 1 > sizeof(key.name)) | 526 | if (namelen + 1 > sizeof(key.name)) |
527 | return -EINVAL; | 527 | return -ESRCH; /* nfserr_badowner */ |
528 | memcpy(key.name, name, namelen); | 528 | memcpy(key.name, name, namelen); |
529 | key.name[namelen] = '\0'; | 529 | key.name[namelen] = '\0'; |
530 | strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname)); | 530 | strlcpy(key.authname, rqst_authname(rqstp), sizeof(key.authname)); |
531 | ret = idmap_lookup(rqstp, nametoid_lookup, &key, &nametoid_cache, &item); | 531 | ret = idmap_lookup(rqstp, nametoid_lookup, &key, &nametoid_cache, &item); |
532 | if (ret == -ENOENT) | 532 | if (ret == -ENOENT) |
533 | ret = -ESRCH; /* nfserr_badname */ | 533 | ret = -ESRCH; /* nfserr_badowner */ |
534 | if (ret) | 534 | if (ret) |
535 | return ret; | 535 | return ret; |
536 | *id = item->id; | 536 | *id = item->id; |
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index 6b641cf2c19a..7ecfa2420307 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h | |||
@@ -158,6 +158,7 @@ void nfsd_lockd_shutdown(void); | |||
158 | #define nfserr_attrnotsupp cpu_to_be32(NFSERR_ATTRNOTSUPP) | 158 | #define nfserr_attrnotsupp cpu_to_be32(NFSERR_ATTRNOTSUPP) |
159 | #define nfserr_bad_xdr cpu_to_be32(NFSERR_BAD_XDR) | 159 | #define nfserr_bad_xdr cpu_to_be32(NFSERR_BAD_XDR) |
160 | #define nfserr_openmode cpu_to_be32(NFSERR_OPENMODE) | 160 | #define nfserr_openmode cpu_to_be32(NFSERR_OPENMODE) |
161 | #define nfserr_badowner cpu_to_be32(NFSERR_BADOWNER) | ||
161 | #define nfserr_locks_held cpu_to_be32(NFSERR_LOCKS_HELD) | 162 | #define nfserr_locks_held cpu_to_be32(NFSERR_LOCKS_HELD) |
162 | #define nfserr_op_illegal cpu_to_be32(NFSERR_OP_ILLEGAL) | 163 | #define nfserr_op_illegal cpu_to_be32(NFSERR_OP_ILLEGAL) |
163 | #define nfserr_grace cpu_to_be32(NFSERR_GRACE) | 164 | #define nfserr_grace cpu_to_be32(NFSERR_GRACE) |
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index fd608a27a8d5..8f05dcd0bf85 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c | |||
@@ -738,7 +738,7 @@ nfserrno (int errno) | |||
738 | { nfserr_jukebox, -EAGAIN }, | 738 | { nfserr_jukebox, -EAGAIN }, |
739 | { nfserr_jukebox, -EWOULDBLOCK }, | 739 | { nfserr_jukebox, -EWOULDBLOCK }, |
740 | { nfserr_jukebox, -ENOMEM }, | 740 | { nfserr_jukebox, -ENOMEM }, |
741 | { nfserr_badname, -ESRCH }, | 741 | { nfserr_badowner, -ESRCH }, |
742 | { nfserr_io, -ETXTBSY }, | 742 | { nfserr_io, -ETXTBSY }, |
743 | { nfserr_notsupp, -EOPNOTSUPP }, | 743 | { nfserr_notsupp, -EOPNOTSUPP }, |
744 | { nfserr_toosmall, -ETOOSMALL }, | 744 | { nfserr_toosmall, -ETOOSMALL }, |