summaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@opteron.9grid.us>2008-05-08 20:26:37 -0500
committerEric Van Hensbergen <ericvh@opteron.9grid.us>2008-05-14 19:23:27 -0500
commit887b3ece65be7b643dfdae0d433c91a26a3f437d (patch)
tree471889dcdd3f7eb6762d863fef236014c63a0301 /fs/9p/v9fs.c
parent332c421e67045343de74e644cdf389f559f0d83f (diff)
downloadlinux-stable-887b3ece65be7b643dfdae0d433c91a26a3f437d.tar.gz
linux-stable-887b3ece65be7b643dfdae0d433c91a26a3f437d.tar.bz2
linux-stable-887b3ece65be7b643dfdae0d433c91a26a3f437d.zip
9p: fix error path during early mount
There was some cleanup issues during early mount which would trigger a kernel bug for certain types of failure. This patch reorganizes the cleanup to get rid of the bad behavior. This also merges the 9pnet and 9pnet_fd modules for the purpose of configuration and initialization. Keeping the fd transport separate from the core 9pnet code seemed like a good idea at the time, but in practice has caused more harm and confusion than good. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r--fs/9p/v9fs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 5c1ccaf0416c..047c791427aa 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -206,12 +206,14 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
v9ses->uid = ~0;
v9ses->dfltuid = V9FS_DEFUID;
v9ses->dfltgid = V9FS_DEFGID;
- v9ses->options = kstrdup(data, GFP_KERNEL);
- if (!v9ses->options) {
- P9_DPRINTK(P9_DEBUG_ERROR,
+ if (data) {
+ v9ses->options = kstrdup(data, GFP_KERNEL);
+ if (!v9ses->options) {
+ P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option string\n");
- retval = -ENOMEM;
- goto error;
+ retval = -ENOMEM;
+ goto error;
+ }
}
rc = v9fs_parse_options(v9ses);
@@ -260,7 +262,6 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
return fid;
error:
- v9fs_session_close(v9ses);
return ERR_PTR(retval);
}