Skip to contentSkip to conversation

Fix section conflict of ext4_ext_{find_goal,invalidate_cache}

PATCH New Martin Michlmayr 4 participants 6 messages May 15, 2007 ext4 file system

lore
Share & tools
lore
#0 lore raw

Building with GCC 4.2, I get the following error:

CC [M] fs/ext4/extents.o
fs/ext4/extents.c:2166: error: __ksymtab_ext4_ext_find_goal causes a section type conflict fs/ext4/extents.c:2163: error: __ksymtab_ext4_ext_invalidate_cache causes a section type conflict

This is because ext4_ext_find_goal and ext4_ext_invalidate_cache are declared static but also exported.

fs/ext4/extents.c +1 -1
@@ -172,7 +172,7 @@ static int ext4_ext_dirty(handle_t *handle, struct inode *inode,
 	return err;
 }
 
-static ext4_fsblk_t ext4_ext_find_goal(struct inode *inode,
+ext4_fsblk_t ext4_ext_find_goal(struct inode *inode,
 			      struct ext4_ext_path *path,
 			      ext4_fsblk_t block)
 {
include/linux/ext4_fs_extents.h +1 -1
@@ -182,7 +182,7 @@ static inline void ext4_ext_tree_changed(struct inode *inode)
 	EXT4_I(inode)->i_ext_generation++;
 }
 
-static inline void
+inline void
 ext4_ext_invalidate_cache(struct inode *inode)
 {
 	EXT4_I(inode)->i_cached_extent.ec_type = EXT4_EXT_CACHE_NO;
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#1 lore raw
Quoted 8 lines · Martin Michlmayr

Building with GCC 4.2, I get the following error:

CC [M] fs/ext4/extents.o
fs/ext4/extents.c:2166: error: __ksymtab_ext4_ext_find_goal causes a section type conflict fs/ext4/extents.c:2163: error: __ksymtab_ext4_ext_invalidate_cache causes a section type conflict

This is because ext4_ext_find_goal and ext4_ext_invalidate_cache are declared static but also exported.

Hmm.. Why are these exported ?

Looking at the code

EXPORT_SYMBOL(ext4_ext_invalidate_cache);
EXPORT_SYMBOL(ext4_ext_insert_extent);
EXPORT_SYMBOL(ext4_ext_walk_space);
EXPORT_SYMBOL(ext4_ext_find_goal);
EXPORT_SYMBOL(ext4_ext_calc_credits_for_insert);

Mingming ? Why are we exporting these ?

Thanks,
Badari

#2 lore raw
Quoted 14 lines · Badari Pulavarty
Quoted 8 lines · Martin Michlmayr

Building with GCC 4.2, I get the following error:

CC [M] fs/ext4/extents.o
fs/ext4/extents.c:2166: error: __ksymtab_ext4_ext_find_goal causes a section type conflict fs/ext4/extents.c:2163: error: __ksymtab_ext4_ext_invalidate_cache causes a section type conflict

This is because ext4_ext_find_goal and ext4_ext_invalidate_cache are declared static but also exported.

Hmm.. Why are these exported ?
Looking at the code

Quoted 6 lines

EXPORT_SYMBOL(ext4_ext_invalidate_cache);
EXPORT_SYMBOL(ext4_ext_insert_extent);
EXPORT_SYMBOL(ext4_ext_walk_space);
EXPORT_SYMBOL(ext4_ext_find_goal);
EXPORT_SYMBOL(ext4_ext_calc_credits_for_insert);

there is one more

EXPORT_SYMBOL(ext4_mark_inode_dirty);

And with fallocate() patch,
EXPORT_SYMBOL(ext4_fallocate);

Quoted 2 lines

Mingming ? Why are we exporting these ?

Don't know. They should all used by ext4 only. Alex, can we remove these exported symbols?

Mingming

#3 lore raw
Quoted 2 lines · Mingming Cao

Don't know. They should all used by ext4 only. Alex, can we remove these exported symbols?

yes, I think so.

thanks, Alex

#4 lore raw

PATCH 1/1 Remove unnecessery exported ext4 symbols

These symbols are used in ext4 only.

fs/ext4/extents.c +0 -9
Index: linux-2.6.21.1/fs/ext4/extents.c
===================================================================
@@ -2550,12 +2550,3 @@
 
 	return num;
 }
-
-EXPORT_SYMBOL(ext4_mark_inode_dirty);
-EXPORT_SYMBOL(ext4_ext_invalidate_cache);
-EXPORT_SYMBOL(ext4_ext_insert_extent);
-EXPORT_SYMBOL(ext4_ext_walk_space);
-EXPORT_SYMBOL(ext4_ext_find_goal);
-EXPORT_SYMBOL(ext4_ext_calc_credits_for_insert);
-EXPORT_SYMBOL(ext4_fallocate);
-
#5 lore raw
In reply to Mingming Cao
Quoted 2 lines · Mingming Cao

Don't know. They should all used by ext4 only. Alex, can we remove these exported symbols?

yes, I think so.

thanks, Alex