Skip to content

Commit

Permalink
9P: fix test at the end of p9_write_work()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Derr authored and Eric Van Hensbergen committed Sep 17, 2012
1 parent 0462194 commit 1957b3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/9p/trans_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static void p9_write_work(struct work_struct *work)
if (m->wpos == m->wsize)
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))
n = POLLOUT;
else
Expand Down

0 comments on commit 1957b3a

Please sign in to comment.