login
Header Space

 
 

9p: fix error path during early mount

To: <git-commits-head@...>
Date: Wednesday, May 14, 2008 - 10:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=887b3e...
Commit:     887b3ece65be7b643dfdae0d433c91a26a3f437d
Parent:     332c421e67045343de74e644cdf389f559f0d83f
Author:     Eric Van Hensbergen &lt;ericvh@opteron.9grid.us&gt;
AuthorDate: Thu May 8 20:26:37 2008 -0500
Committer:  Eric Van Hensbergen &lt;ericvh@opteron.9grid.us&gt;
CommitDate: Wed May 14 19:23:27 2008 -0500

    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 &lt;ericvh@gmail.com&gt;
---
 fs/9p/v9fs.c               |   13 +++++++------
 fs/9p/vfs_super.c          |   34 ++++++++++++++++------------------
 include/net/9p/9p.h        |    1 +
 include/net/9p/transport.h |    1 -
 net/9p/Kconfig             |   10 ----------
 net/9p/Makefile            |    3 ---
 net/9p/mod.c               |    1 +
 net/9p/trans_fd.c          |   29 ++++++++++++++++++++++-------
 8 files changed, 47 insertions(+), 45 deletions(-)

diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 5c1ccaf..047c791 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-&gt;uid = ~0;
 	v9ses-&gt;dfltuid = V9FS_DEFUID;
 	v9ses-&gt;dfltgid = V9FS_DEFGID;
-	v9ses-&gt;options = kstrdup(data, GFP_KERNEL);
-	if (!v9ses-&gt;options) {
-		P9_DPRINTK(P9_DEBUG_ERROR,
+	if (data) {
+		v9ses-&gt;options = kstrdup(data, GFP_KERNEL);
+		if (!v9ses-&gt;options) {
+			P9_DPRINTK(P9_DEBUG_ERROR,
 		...
speck-geostationary