diff mbox

[V9fs-developer,2/4] 9P: fix test at the end of p9_write_work()

Message ID 1347887791-13726-3-git-send-email-simon.derr@bull.net (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Derr Sept. 17, 2012, 1:16 p.m. UTC
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>
---
 net/9p/trans_fd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 15f55b3..e8a00a2 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -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