]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: MKNOD should return NFSERR_BADTYPE instead of NFSERR_INVAL
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Oct 2020 14:41:12 +0000 (10:41 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 5 Nov 2020 22:20:12 +0000 (17:20 -0500)
commit8ad71898972cb931ca60aa12a8de88cf8781a087
tree516f071d9827605b654aa83c0d46cb344653593c
parentf635be4e3275d32870763aea20e7d890f56a3b44
NFSD: MKNOD should return NFSERR_BADTYPE instead of NFSERR_INVAL

A late paragraph of RFC 1813 Section 3.3.11 states:

| ... if the server does not support the target type or the
| target type is illegal, the error, NFS3ERR_BADTYPE, should
| be returned. Note that NF3REG, NF3DIR, and NF3LNK are
| illegal types for MKNOD.

The Linux NFS server incorrectly returns NFSERR_INVAL in these
cases.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs3proc.c