b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Ignore debugfs on kernels without debugfs support
@ 2010-06-09 22:39 Sven Eckelmann
  2010-06-10  8:05 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2010-06-09 22:39 UTC (permalink / raw)
  To: b.a.t.m.a.n

All code for debugfs is ignored when the creation of the batman-adv root
directory in debugfs fails. It must also be ignored when the
debugfs_create_dir tells us that debugfs is not implemented to prevent a
crash during the unload of the module.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 Must be applied in both maint and trunk.

 batman-adv-kernelland/bat_debugfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/batman-adv-kernelland/bat_debugfs.c b/batman-adv-kernelland/bat_debugfs.c
index cf2545a..b8081e3 100644
--- a/batman-adv-kernelland/bat_debugfs.c
+++ b/batman-adv-kernelland/bat_debugfs.c
@@ -101,6 +101,8 @@ static struct bat_debuginfo *mesh_debuginfos[] = {
 void debugfs_init(void)
 {
 	bat_debugfs = debugfs_create_dir(DEBUGFS_BAT_SUBDIR, NULL);
+	if (bat_debugfs == ERR_PTR(-ENODEV))
+		bat_debugfs = NULL;
 }
 
 void debugfs_destroy(void)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Ignore debugfs on kernels without debugfs support
  2010-06-09 22:39 [B.A.T.M.A.N.] [PATCH] batman-adv: Ignore debugfs on kernels without debugfs support Sven Eckelmann
@ 2010-06-10  8:05 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2010-06-10  8:05 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Thursday 10 June 2010 06:39:16 Sven Eckelmann wrote:
> All code for debugfs is ignored when the creation of the batman-adv root
> directory in debugfs fails. It must also be ignored when the
> debugfs_create_dir tells us that debugfs is not implemented to prevent a
> crash during the unload of the module.

Applied in revision 1698.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-10  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 22:39 [B.A.T.M.A.N.] [PATCH] batman-adv: Ignore debugfs on kernels without debugfs support Sven Eckelmann
2010-06-10  8:05 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).