From patchwork Tue Mar 30 09:41:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 89332 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2UFLVhB027181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 30 Mar 2010 15:22:07 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NwdFv-0001cI-3I; Tue, 30 Mar 2010 15:21:27 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NwXxC-0004d5-EY for v9fs-developer@lists.sourceforge.net; Tue, 30 Mar 2010 09:41:46 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.218.218 as permitted sender) client-ip=209.85.218.218; envelope-from=error27@gmail.com; helo=mail-bw0-f218.google.com; Received: from mail-bw0-f218.google.com ([209.85.218.218]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NwXx7-0007aR-02 for v9fs-developer@lists.sourceforge.net; Tue, 30 Mar 2010 09:41:46 +0000 Received: by bwz10 with SMTP id 10so14324415bwz.2 for ; Tue, 30 Mar 2010 02:41:35 -0700 (PDT) Received: by 10.204.14.84 with SMTP id f20mr7937170bka.209.1269942094862; Tue, 30 Mar 2010 02:41:34 -0700 (PDT) Received: from bicker ([196.43.68.110]) by mx.google.com with ESMTPS id l1sm46433528bkl.8.2010.03.30.02.41.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 02:41:34 -0700 (PDT) Date: Tue, 30 Mar 2010 12:41:25 +0300 From: Dan Carpenter To: Eric Van Hensbergen Message-ID: <20100330094125.GH5069@bicker> Mail-Followup-To: Dan Carpenter , Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , Sripathi Kodi , Jim Garlick , Martin Stava , "Aneesh Kumar K.V" , v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NwXx7-0007aR-02 X-Mailman-Approved-At: Tue, 30 Mar 2010 15:21:25 +0000 Cc: Latchesar Ionkov , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, Jim Garlick , Ron Minnich Subject: [V9fs-developer] [patch] 9p: return on mutex_lock_interruptible() 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: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 30 Mar 2010 15:22:08 +0000 (UTC) diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d8a3afe..bbe00cf 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -130,6 +130,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) rdir = (struct p9_rdir *) fid->rdir; err = mutex_lock_interruptible(&rdir->mutex); + if (err) + return err; while (err == 0) { if (rdir->tail == rdir->head) { err = v9fs_file_readn(filp, rdir->buf, NULL,