9P: fix test at the end of p9_write_work()

At the end of p9_write_work() we want to test if there is still data to send.
This means:
- either the current request still has data to send (wsize != 0)
- or there are requests in the unsent queue

Signed-off-by: Simon Derr <simon.derr@bull.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
Simon Derr 2012-09-17 15:16:29 +02:00 committed by Eric Van Hensbergen
parent 0462194d35
commit 1957b3a86f
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ static void p9_write_work(struct work_struct *work)
if (m->wpos == m->wsize) if (m->wpos == m->wsize)
m->wpos = m->wsize = 0; m->wpos = m->wsize = 0;
if (m->wsize == 0 && !list_empty(&m->unsent_req_list)) { if (m->wsize || !list_empty(&m->unsent_req_list)) {
if (test_and_clear_bit(Wpending, &m->wsched)) if (test_and_clear_bit(Wpending, &m->wsched))
n = POLLOUT; n = POLLOUT;
else else