# make
CHK include/linux/version.h
CHK include/linux/compile.h
CHK usr/initramfs_list
CC fs/reiser4/debug.o
In file included from fs/reiser4/lock.h:15,
from fs/reiser4/context.h:14,
from fs/reiser4/debug.c:25:
fs/reiser4/txnmgr.h: In function `spin_atom_init':
fs/reiser4/txnmgr.h:512: error: duplicate case value
fs/reiser4/txnmgr.h:512: error: previously used here
fs/reiser4/txnmgr.h: In function `spin_txnh_init':
fs/reiser4/txnmgr.h:513: error: duplicate case value
fs/reiser4/txnmgr.h:513: error: previously used here
fs/reiser4/txnmgr.h: In function `spin_txnmgr_init':
fs/reiser4/txnmgr.h:514: error: duplicate case value
fs/reiser4/txnmgr.h:514: error: previously used here
In file included from fs/reiser4/context.h:14,
from fs/reiser4/debug.c:25:
fs/reiser4/lock.h: In function `spin_stack_init':
fs/reiser4/lock.h:198: error: duplicate case value
fs/reiser4/lock.h:198: error: previously used here
In file included from fs/reiser4/znode.h:16,
from fs/reiser4/tree.h:15,
from fs/reiser4/super.h:9,
from fs/reiser4/debug.c:26:
fs/reiser4/jnode.h: In function `spin_jnode_init':
fs/reiser4/jnode.h:344: error: duplicate case value
fs/reiser4/jnode.h:344: error: previously used here
fs/reiser4/jnode.h: In function `spin_jload_init':
fs/reiser4/jnode.h:348: error: duplicate case value
fs/reiser4/jnode.h:348: error: previously used here
In file included from fs/reiser4/super.h:9,
from fs/reiser4/debug.c:26:
fs/reiser4/tree.h: In function `spin_epoch_init':
fs/reiser4/tree.h:169: error: duplicate case value
fs/reiser4/tree.h:169: error: previously used here
In file included from fs/reiser4/debug.c:26:
fs/reiser4/super.h: In function `spin_super_init':
fs/reiser4/super.h:379: error: duplicate case value
fs/reiser4/super.h:379: error: previously used here
make[2]: *** [fs/reiser4/debug.o] Error 1
make[1]: *** [fs/reiser4] Error 2
make: *** [fs] Error 2
解决方法。。
http://www.linuxsir.org/bbs/showthread.php?t=224491
It seems to appear when CONFIG_SMP=N and CONFIG_DEBUG_SPINLOCK=N and
CONFIG_REISER4_DEBUG=N.
In this case, spinlock_t is an empty struct (see
include/linux/spinlock_types.h and
include/linux/spinlock_types_up.h). Then sizeof(spinlock_t) _is_ 0,
and this breaks some code like cassert calls from
fs/reiser4/spin_macros.h line 85 (FIELD is a spinlock_t) :
82 static inline void spin_ ## NAME ## _init(TYPE *x) \
83 { \
84 __ODCA("nikita-2987", x != NULL); \
85 cassert(sizeof(x->FIELD) != 0); \
86 memset(& x->FIELD, 0, sizeof x->FIELD); \
87 spin_lock_init(& x->FIELD.lock); \
88 } \
89