eventfd: add a BUILD_BUG_ON() to ensure consistency between EFD_SEMAPHORE and the...
[linux-2.6-microblaze.git] / fs / eventfd.c
index ad8186d..0252b71 100644 (file)
@@ -383,6 +383,7 @@ static int do_eventfd(unsigned int count, int flags)
        /* Check the EFD_* constants for consistency.  */
        BUILD_BUG_ON(EFD_CLOEXEC != O_CLOEXEC);
        BUILD_BUG_ON(EFD_NONBLOCK != O_NONBLOCK);
+       BUILD_BUG_ON(EFD_SEMAPHORE != (1 << 0));
 
        if (flags & ~EFD_FLAGS_SET)
                return -EINVAL;