[PATCH] 9p: fix leak on error path
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 29 Sep 2006 09:01:06 +0000 (02:01 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:20 +0000 (09:18 -0700)
If register_filesystem() fails mux workqueue must be killed.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@lanl.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/9p/v9fs.c

index 22f7ccd58d38725f7c23f5064c3ace5047aba97f..0f628041e3f7660c75fb846985b4124ba571cffe 100644 (file)
@@ -460,8 +460,10 @@ static int __init init_v9fs(void)
 
        ret = v9fs_mux_global_init();
        if (!ret)
-               ret = register_filesystem(&v9fs_fs_type);
-
+               return ret;
+       ret = register_filesystem(&v9fs_fs_type);
+       if (!ret)
+               v9fs_mux_global_exit();
        return ret;
 }