public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v9fs-copy-transport-proto.patch
@ 2005-09-21  1:22 Latchesar Ionkov
  0 siblings, 0 replies; only message in thread
From: Latchesar Ionkov @ 2005-09-21  1:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: v9fs-developer

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>

Attach copy of the transport prototype to the v9fs session, not the prototype
itself. Otherwise two sessions using the same transport type will overwrite
each other's data.

---
commit 34ad50ad5bf63c55687350d9f4e3c4dcc44304a7
tree ddd9f6d0b2c00c5e8aee40d4883e1e615bea4b29
parent 4f0a459f11309161616e22f4acf918eb04a9bd1a
author Latchesar Ionkov <lucho@ionkov.net> Tue, 20 Sep 2005 19:27:34 -0400
committer Latchesar Ionkov <lucho@ionkov.net> Tue, 20 Sep 2005 19:27:34 -0400

 fs/9p/v9fs.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -303,7 +303,13 @@ v9fs_session_init(struct v9fs_session_in
 		goto SessCleanUp;
 	};
 
-	v9ses->transport = trans_proto;
+	v9ses->transport = kmalloc(sizeof(*v9ses->transport), GFP_KERNEL);
+	if (!v9ses->transport) {
+		retval = -ENOMEM;
+		goto SessCleanUp;
+	}
+
+	memmove(v9ses->transport, trans_proto, sizeof(*v9ses->transport));
 
 	if ((retval = v9ses->transport->init(v9ses, dev_name, data)) < 0) {
 		eprintk(KERN_ERR, "problem initializing transport\n");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-21  1:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-21  1:22 [PATCH] v9fs-copy-transport-proto.patch Latchesar Ionkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox