diff mbox

[V9fs-developer,RFC] 9P/Virtio: kernel panic in 'mount' command.

Message ID 20100202162413.291265b9@in.ibm.com (mailing list archive)
State Superseded, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

Sripathi Kodi Feb. 2, 2010, 10:54 a.m. UTC
None
diff mbox

Patch

diff -uprN a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
--- a/net/9p/trans_virtio.c	2010-02-01 21:21:34.000000000 +0530
+++ b/net/9p/trans_virtio.c	2010-02-02 16:03:21.000000000 +0530
@@ -101,9 +101,11 @@  static void p9_virtio_close(struct p9_cl
 {
 	struct virtio_chan *chan = client->trans;
 
-	mutex_lock(&virtio_9p_lock);
-	chan->inuse = false;
-	mutex_unlock(&virtio_9p_lock);
+	if (chan) {
+		mutex_lock(&virtio_9p_lock);
+		chan->inuse = false;
+		mutex_unlock(&virtio_9p_lock);
+	}
 }
 
 /**