Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d6b5602 authored by Latchesar Ionkov's avatar Latchesar Ionkov Committed by Eric Van Hensbergen
Browse files

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: default avatarLatchesar Ionkov <lucho@ionkov.net>
parent e46662be
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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)