projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c216fd7
)
NFS: Ensure we return zero if applications attempt to write zero bytes
author
Chuck Lever
<chuck.lever@oracle.com>
Mon, 12 Nov 2007 17:16:58 +0000
(12:16 -0500)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 26 Nov 2007 21:32:38 +0000
(16:32 -0500)
A zero byte count direct write request should be a successful no-op, not an
error.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/direct.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/direct.c
b/fs/nfs/direct.c
index 88d5d1c7f987982e2c7324fe24052cd5b2ee6f26..4d726e9db2953a2315825040b724e3c5c27c0636 100644
(file)
--- a/
fs/nfs/direct.c
+++ b/
fs/nfs/direct.c
@@
-890,6
+890,8
@@
ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
retval = generic_write_checks(file, &pos, &count, 0);
if (retval)
goto out;
+ if (!count)
+ goto out; /* return 0 */
retval = -EINVAL;
if ((ssize_t) count < 0)