From patchwork Mon Sep 17 13:16:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Derr X-Patchwork-Id: 1467131 Return-Path: X-Original-To: patchwork-v9fs-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork1.kernel.org (Postfix) with ESMTP id 470523FCFC for ; Mon, 17 Sep 2012 13:41:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.b.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TDbZy-0007wg-Or; Mon, 17 Sep 2012 13:41:38 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TDbZx-0007wb-NR for v9fs-developer@lists.sourceforge.net; Mon, 17 Sep 2012 13:41:37 +0000 X-ACL-Warn: Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1TDbZq-0006rc-Ay for v9fs-developer@lists.sourceforge.net; Mon, 17 Sep 2012 13:41:37 +0000 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 4B95319DD53; Mon, 17 Sep 2012 15:16:50 +0200 (CEST) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01860-06; Mon, 17 Sep 2012 15:16:42 +0200 (CEST) Received: from atlas.frec.bull.fr (atlas.frec.bull.fr [129.183.91.13]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id BD7B819DD64; Mon, 17 Sep 2012 15:16:33 +0200 (CEST) Received: by atlas.frec.bull.fr (Postfix, from userid 15269) id 9A34837FFA2; Mon, 17 Sep 2012 15:16:33 +0200 (CEST) From: Simon Derr To: v9fs-developer@lists.sourceforge.net Date: Mon, 17 Sep 2012 15:16:29 +0200 Message-Id: <1347887791-13726-3-git-send-email-simon.derr@bull.net> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <1347887791-13726-1-git-send-email-simon.derr@bull.net> References: <1347887791-13726-1-git-send-email-simon.derr@bull.net> To: v9fs-developer@lists.sourceforge.net X-Virus-Scanned: by amavisd-new at frec.bull.fr X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1TDbZq-0006rc-Ay Cc: simon.derr@bull.net Subject: [V9fs-developer] [PATCH 2/4] 9P: fix test at the end of p9_write_work() X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net 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 --- net/9p/trans_fd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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