[PATCH] jbd: use BUILD_BUG_ON in journal init
authorAlexey Dobriyan <adobriyan@gmail.com>
Wed, 27 Sep 2006 08:49:28 +0000 (01:49 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Sep 2006 15:26:09 +0000 (08:26 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Stephen Tweedie <sct@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/jbd/journal.c

index 87c5a6d..2613fca 100644 (file)
@@ -2047,13 +2047,7 @@ static int __init journal_init(void)
 {
        int ret;
 
-/* Static check for data structure consistency.  There's no code
- * invoked --- we'll just get a linker failure if things aren't right.
- */
-       extern void journal_bad_superblock_size(void);
-       if (sizeof(struct journal_superblock_s) != 1024)
-               journal_bad_superblock_size();
-
+       BUILD_BUG_ON(sizeof(struct journal_superblock_s) != 1024);
 
        ret = journal_init_caches();
        if (ret != 0)