Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5576cfa5cd8d8aa874bd4ee500dc8a2e7cbad18
Commit:     a5576cfa5cd8d8aa874bd4ee500dc8a2e7cbad18
Parent:     50e1092b3a119bb4660bb6bd2e1749dc2d8ac62e
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 12 11:08:33 2007 -0500
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Wed Dec 12 11:08:33 2007 -0500

    Revert "NFS: Ensure we return zero if applications attempt to write zero 
bytes"
    
    This reverts commit b9148c6b80d802dbc2a7530b29915a80432e50c7.
    
    On Wed, 12 Dec 2007 10:57:30 -0500, Chuck Lever wrote
    > commit b9148c6b should be reverted.  It was recently forward-ported
    > from some years-old patches, and is clearly not needed now.
    >
    > On Dec 11, 2007, at 5:21 PM, Adrian Bunk wrote:
    >
    >> This code became dead after commit
    >> b9148c6b80d802dbc2a7530b29915a80432e50c7
    >> (which BTW doesn't seem to have changed any behaviour) and can
    >> therefore
    >> be removed.
    >>
    >> Spotted by the Coverity checker.
    >>
    >> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    >>
    >> ---
    >> --- linux-2.6/fs/nfs/direct.c.old     2007-12-02 21:54:53.000000000 +0100
    >> +++ linux-2.6/fs/nfs/direct.c 2007-12-02 21:55:10.000000000 +0100
    >> @@ -897,15 +897,12 @@ ssize_t nfs_file_direct_write(struct kio
    >>       if (!count)
    >>               goto out;       /* return 0 */
    >>
    >>       retval = -EINVAL;
    >>       if ((ssize_t) count < 0)
    >>               goto out;
    >> -     retval = 0;
    >> -     if (!count)
    >> -             goto out;
    >>
    >>       retval = nfs_sync_mapping(mapping);
    >>       if (retval)
    >>               goto out;
    >>
    >>       retval = nfs_direct_write(iocb, iov, nr_segs, pos, count);
    >>
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/direct.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 5e8d82f..3c9d16b 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -894,8 +894,6 @@ 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