Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333413
b: refs/heads/master
c: 584a8c1
h: refs/heads/master
i:
  333411: 6f4547c
v: v3
  • Loading branch information
Simon Derr authored and Eric Van Hensbergen committed Sep 17, 2012
1 parent 33bbc2f commit 3c1e921
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1957b3a86f8eb5ceab32e3aae99e2822258aa530
refs/heads/master: 584a8c13d58423462680907d4cc40d9929c9030a
19 changes: 10 additions & 9 deletions trunk/net/9p/trans_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,9 @@ static void p9_write_work(struct work_struct *work)
clear_bit(Wpending, &m->wsched);
err = p9_fd_write(m->client, m->wbuf + m->wpos, m->wsize - m->wpos);
p9_debug(P9_DEBUG_TRANS, "mux %p sent %d bytes\n", m, err);
if (err == -EAGAIN) {
clear_bit(Wworksched, &m->wsched);
return;
}
if (err == -EAGAIN)
goto end_clear;


if (err < 0)
goto error;
Expand All @@ -492,19 +491,21 @@ static void p9_write_work(struct work_struct *work)
if (m->wpos == m->wsize)
m->wpos = m->wsize = 0;

end_clear:
clear_bit(Wworksched, &m->wsched);

if (m->wsize || !list_empty(&m->unsent_req_list)) {
if (test_and_clear_bit(Wpending, &m->wsched))
n = POLLOUT;
else
n = p9_fd_poll(m->client, NULL);

if (n & POLLOUT) {
if ((n & POLLOUT) &&
!test_and_set_bit(Wworksched, &m->wsched)) {
p9_debug(P9_DEBUG_TRANS, "sched write work %p\n", m);
schedule_work(&m->wq);
} else
clear_bit(Wworksched, &m->wsched);
} else
clear_bit(Wworksched, &m->wsched);
}
}

return;

Expand Down

0 comments on commit 3c1e921

Please sign in to comment.