aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2007-07-11 17:14:46 -0400
committerEric Van Hensbergen <ericvh@ericvh-desktop.austin.ibm.com>2007-07-14 16:14:01 -0400
commit1d6b5602381524c339af2c2fdfe42ad0a01464a4 (patch)
tree45c3ca8ad653dd2e55b88cd8d9d36502df604f4f
parente46662be7fddde3464bf208317542c2f8df13d0b (diff)
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 <lucho@ionkov.net>
-rw-r--r--net/9p/mux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/9p/mux.c b/net/9p/mux.c
index c3aa87bc8b97..acb038810f39 100644
--- a/net/9p/mux.c
+++ b/net/9p/mux.c
@@ -505,8 +505,12 @@ again:
505 return; 505 return;
506 } 506 }
507 507
508 if (err <= 0) 508 if (err < 0)
509 goto error;
510 else if (err == 0) {
511 err = -EREMOTEIO;
509 goto error; 512 goto error;
513 }
510 514
511 m->wpos += err; 515 m->wpos += err;
512 if (m->wpos == m->wsize) 516 if (m->wpos == m->wsize)