[PATCH 9/9] fsnotify: remove fsnotify_init()

From: Lai Jiangshan
Date: Fri Mar 15 2013 - 12:53:26 EST


Since fsnotify_init() is empty in runtime, remove it.
The build time test is moved to notification.c

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
Cc: Eric Paris <eparis@xxxxxxxxxxxxxx>
---
fs/notify/fsnotify.c | 8 --------
fs/notify/notification.c | 2 ++
2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index eaa0e9e..2ea0c1a 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -295,11 +295,3 @@ out:
return ret;
}
EXPORT_SYMBOL_GPL(fsnotify);
-
-static __init int fsnotify_init(void)
-{
- BUILD_BUG_ON(HWEIGHT32(ALL_FSNOTIFY_EVENTS) != 23);
-
- return 0;
-}
-core_initcall(fsnotify_init);
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 7b51b05..80fc0b5 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -453,6 +453,8 @@ static __init int fsnotify_notification_init(void)
fsnotify_event_cachep = KMEM_CACHE(fsnotify_event, SLAB_PANIC);
fsnotify_event_holder_cachep = KMEM_CACHE(fsnotify_event_holder, SLAB_PANIC);

+ BUILD_BUG_ON(HWEIGHT32(ALL_FSNOTIFY_EVENTS) != 23);
+
q_overflow_event = fsnotify_create_event(NULL, FS_Q_OVERFLOW, NULL,
FSNOTIFY_EVENT_NONE, NULL, 0,
GFP_KERNEL);
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/