summaryrefslogtreecommitdiffstats
path: root/fs/notify
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:37 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:50 -0400
commit20dee624ca40db227aa70cb3f44d2d6cb4fdbab4 (patch)
tree527888dd4cda99501b7ac16a3783f57251807c13 /fs/notify
parent44b350fc23e36e95c8e042b7ded66217ea2b9d72 (diff)
downloadlinux-20dee624ca40db227aa70cb3f44d2d6cb4fdbab4.tar.bz2
fsnotify: check to make sure all fsnotify bits are unique
This patch adds a check to make sure that all fsnotify bits are unique and we cannot accidentally use the same bit for 2 different fsnotify event types. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/fsnotify.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 9810babb1a3b..076c10e959d5 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -275,6 +275,8 @@ EXPORT_SYMBOL_GPL(fsnotify);
static __init int fsnotify_init(void)
{
+ BUG_ON(hweight32(ALL_FSNOTIFY_EVENTS) != 23);
+
return init_srcu_struct(&fsnotify_grp_srcu);
}
subsys_initcall(fsnotify_init);