diff mbox

[V9fs-developer,-V2,1/3] 9p: Return ENOENT on 9p channel allocation failure.

Message ID 87tytmewpc.fsf@linux.vnet.ibm.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Aneesh Kumar K.V Feb. 12, 2010, 7:31 a.m. UTC
None
diff mbox

Patch

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;