From patchwork Fri Feb 12 07:31:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 78845 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 o1C7WGse024812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Feb 2010 07:32:56 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nfq0a-0003BU-EX; Fri, 12 Feb 2010 07:32:12 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Nfq0Z-0003BO-Fk for v9fs-developer@lists.sourceforge.net; Fri, 12 Feb 2010 07:32:11 +0000 X-ACL-Warn: Received: from e28smtp03.in.ibm.com ([122.248.162.3]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Nfq0X-0008Km-RC for v9fs-developer@lists.sourceforge.net; Fri, 12 Feb 2010 07:32:11 +0000 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp03.in.ibm.com (8.14.3/8.13.1) with ESMTP id o1C7W1l7012855 for ; Fri, 12 Feb 2010 13:02:01 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1C7W0bG3031076 for ; Fri, 12 Feb 2010 13:02:00 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o1C7W0gT003986 for ; Fri, 12 Feb 2010 18:32:00 +1100 Received: from skywalker.linux.vnet.ibm.com ([9.124.211.8]) by d28av04.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o1C7VxIE003980; Fri, 12 Feb 2010 18:31:59 +1100 From: "Aneesh Kumar K. V" To: jvrao In-Reply-To: <4B74C0FE.6070601@linux.vnet.ibm.com> References: <1265909071-11474-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <4B74C0FE.6070601@linux.vnet.ibm.com> Date: Fri, 12 Feb 2010 13:01:59 +0530 Message-ID: <87tytmewpc.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 X-Spam-Score: -1.7 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.7 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Nfq0X-0008Km-RC Cc: v9fs-developer@lists.sourceforge.net Subject: Re: [V9fs-developer] [PATCH -V2 1/3] 9p: Return ENOENT on 9p channel allocation failure. 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]); Fri, 12 Feb 2010 07:32:57 +0000 (UTC) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 24e3a1e..fe18bc4 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -287,6 +287,7 @@ static int p9_virtio_create(struct p9_client *client, const char *devname, char *args) { struct virtio_chan *chan; + int ret = -ENOENT; int found = 0; mutex_lock(&virtio_9p_lock); @@ -297,13 +298,14 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) found = 1; break; } + ret = -EBUSY; } } mutex_unlock(&virtio_9p_lock); if (!found) { printk(KERN_ERR "9p: no channels available\n"); - return -ENOENT; + return ret; } client->trans = (void *)chan;