diff mbox

[V9fs-developer] 9p: Fix the kernel crash on a failed mount

Message ID 1265629832-2782-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Commit fb786100f7c75e154e63d0f5a2982e6d46dfb602
Headers show

Commit Message

Aneesh Kumar K.V Feb. 8, 2010, 11:50 a.m. UTC
None
diff mbox

Patch

diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index ea1e3da..85d5057 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -102,7 +102,8 @@  static void p9_virtio_close(struct p9_client *client)
 	struct virtio_chan *chan = client->trans;
 
 	mutex_lock(&virtio_9p_lock);
-	chan->inuse = false;
+	if (chan)
+		chan->inuse = false;
 	mutex_unlock(&virtio_9p_lock);
 }