LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Debugfs compile fix.
@ 2008-01-30  6:40 Denis V. Lunev
  0 siblings, 0 replies; only message in thread
From: Denis V. Lunev @ 2008-01-30  6:40 UTC (permalink / raw)
  To: greg, davem; +Cc: randy.dunlap, netdev, linux-kernel, Denis V. Lunev

Debugfs is not compiled without CONFIG_SYSFS in net-2.6 tree. Move
kobject_create_and_add under appropriate ifdef. The fix looks correct
from a first glance, but may be the dependency should be added into
the Kconfig.

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 fs/debugfs/inode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index d26e282..61cc937 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -432,9 +432,11 @@ static int __init debugfs_init(void)
 {
 	int retval;
 
+#ifdef CONFIG_SYSFS
 	debug_kobj = kobject_create_and_add("debug", kernel_kobj);
 	if (!debug_kobj)
 		return -EINVAL;
+#endif
 
 	retval = register_filesystem(&debug_fs_type);
 	if (retval)
-- 
1.5.3.rc5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-30  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-30  6:40 [PATCH] Debugfs compile fix Denis V. Lunev

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).