]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: zero-length WRITE should succeed
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 15 Nov 2018 16:21:40 +0000 (11:21 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 27 Nov 2018 21:23:12 +0000 (16:23 -0500)
commit03e1e4feb4dd60c69ad5d85f878331f4faf9ff05
tree36ab65a9e2983ac88d1662fbb207ceeba1a900d5
parent3da2c7e7dd758fc8d8e2d8f7585bdd4a6ddd3393
nfsd4: zero-length WRITE should succeed

Zero-length writes are legal; from 5661 section 18.32.3: "If the count
is zero, the WRITE will succeed and return a count of zero subject to
permissions checking".

This check is unnecessary and is causing zero-length reads to return
EINVAL.

Cc: stable@vger.kernel.org
Fixes: 07e0d2cc03bb "NFSD: Refactor the generic write vector fill helper"
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c