Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f94b3470 authored by Eric Van Hensbergen's avatar Eric Van Hensbergen Committed by Linus Torvalds
Browse files

[PATCH] 9p: fix bogus return code checks during initialization



There is a simple logic error in init_v9fs - the return code checks are
reversed.  This patch fixes the return code and adds some messages to prevent
module initialization from failing silently.

Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f49d5e62
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -132,8 +132,10 @@ int v9fs_mux_global_init(void)
		v9fs_mux_poll_tasks[i].task = NULL;
		v9fs_mux_poll_tasks[i].task = NULL;


	v9fs_mux_wq = create_workqueue("v9fs");
	v9fs_mux_wq = create_workqueue("v9fs");
	if (!v9fs_mux_wq)
	if (!v9fs_mux_wq) {
		printk(KERN_WARNING "v9fs: mux: creating workqueue failed\n");
		return -ENOMEM;
		return -ENOMEM;
	}


	return 0;
	return 0;
}
}
+8 −3
Original line number Original line Diff line number Diff line
@@ -457,14 +457,19 @@ static int __init init_v9fs(void)


	v9fs_error_init();
	v9fs_error_init();


	printk(KERN_INFO "Installing v9fs 9P2000 file system support\n");
	printk(KERN_INFO "Installing v9fs 9p2000 file system support\n");


	ret = v9fs_mux_global_init();
	ret = v9fs_mux_global_init();
	if (!ret)
	if (ret) {
		printk(KERN_WARNING "v9fs: starting mux failed\n");
		return ret;
		return ret;
	}
	ret = register_filesystem(&v9fs_fs_type);
	ret = register_filesystem(&v9fs_fs_type);
	if (!ret)
	if (ret) {
		printk(KERN_WARNING "v9fs: registering file system failed\n");
		v9fs_mux_global_exit();
		v9fs_mux_global_exit();
	}

	return ret;
	return ret;
}
}