提交 1d6b5602 编写于 作者: L Latchesar Ionkov 提交者: Eric Van Hensbergen

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: NLatchesar Ionkov <lucho@ionkov.net>
上级 e46662be
......@@ -505,8 +505,12 @@ static void p9_write_work(struct work_struct *work)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册