Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d6b5602381524c339af2c2fdfe42ad0a01464a4
Commit:     1d6b5602381524c339af2c2fdfe42ad0a01464a4
Parent:     e46662be7fddde3464bf208317542c2f8df13d0b
Author:     Latchesar Ionkov <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 15:14:46 2007 -0600
Committer:  Eric Van Hensbergen <[EMAIL PROTECTED]>
CommitDate: Sat Jul 14 15:14:01 2007 -0500

    net/9p: set error to EREMOTEIO if trans->write returns zero
    
    If trans->write returns 0, p9_write_work goes through the error path, but
    sets the error code to zero.
    
    This patch sets the error code to EREMOTEIO if trans->write returns zero
    value.
    
    Signed-off-by: Latchesar Ionkov <[EMAIL PROTECTED]>
---
 net/9p/mux.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/9p/mux.c b/net/9p/mux.c
index c3aa87b..acb0388 100644
--- a/net/9p/mux.c
+++ b/net/9p/mux.c
@@ -505,8 +505,12 @@ again:
                return;
        }
 
-       if (err <= 0)
+       if (err < 0)
+               goto error;
+       else if (err == 0) {
+               err = -EREMOTEIO;
                goto error;
+       }
 
        m->wpos += err;
        if (m->wpos == m->wsize)
-
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