Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9148c6b80d802dbc2a7530b29915a80432e50c7
Commit:     b9148c6b80d802dbc2a7530b29915a80432e50c7
Parent:     c216fd708e1a97431925ecffd6d1896cff61df0a
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 12 12:16:58 2007 -0500
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Mon Nov 26 16:32:38 2007 -0500

    NFS: Ensure we return zero if applications attempt to write zero bytes
    
    A zero byte count direct write request should be a successful no-op, not an
    error.
    
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/direct.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 88d5d1c..4d726e9 100644
--- 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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to