OCFS2: __init / __exit problem

From: Jan-Benedict Glaw
Date: Sat Jan 07 2006 - 08:18:56 EST


Hi!

$ make ARCH=vax CROSS_COMPILE=vax-linux-uclibc- mopboot
:
LD .tmp_vmlinux1
`exit_ocfs2_uptodate_cache' referenced in section `.init.text' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
`exit_ocfs2_extent_maps' referenced in section `.init.text' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
make: *** [.tmp_vmlinux1] Error 1

This happens with CONFIG_MODULES=n because:

super.c:
~~~~~~~~
static int __init ocfs2_init(void)
{
:
leave:
if (status < 0) {
ocfs2_free_mem_caches();
exit_ocfs2_uptodate_cache();
exit_ocfs2_extent_maps();
}
:
}


uptodate.h:void __exit exit_ocfs2_uptodate_cache(void);
extent_map.c:void __exit exit_ocfs2_extent_maps(void)
extent_map.h:void exit_ocfs2_extent_maps(void);

So an __inint function references __exit functions (which are
discarded for non-modular builds) and the declaration of
exit_ocfs2_extent_maps() in extent_map.h is missing __exit.

MfG, JBG

--
Jan-Benedict Glaw jbglaw@xxxxxxxxxx . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fÃr einen Freien Staat voll Freier BÃrger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature