From: Latchesar Ionkov Date: Wed, 11 Jul 2007 21:14:46 +0000 (-0600) Subject: net/9p: set error to EREMOTEIO if trans->write returns zero X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1d6b5602381524c339af2c2fdfe42ad0a01464a4;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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: 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)