[2.6 patch] reiserfs: some functions mustn't be inline

From: Adrian Bunk
Date: Mon Apr 28 2008 - 11:41:51 EST


This patch fixes the following build errors with UML and gcc 4.3:

<-- snip -->

...
CC fs/reiserfs/do_balan.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/do_balan.c: In function âbalance_leafâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/do_balan.c:34: sorry, unimplemented: inlining failed in call to âdo_balance_mark_leaf_dirtyâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/do_balan.c:1018: sorry, unimplemented: called from here
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/do_balan.c:34: sorry, unimplemented: inlining failed in call to âdo_balance_mark_leaf_dirtyâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/do_balan.c:1174: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/do_balan.o] Error 1
...
CC fs/reiserfs/namei.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/namei.c: In function âsearch_by_entry_keyâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/namei.c:66: sorry, unimplemented: inlining failed in call to âset_de_name_and_namelenâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/namei.c:162: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/namei.o] Error 1
...
CC fs/reiserfs/inode.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/inode.c: In function âreiserfs_get_blockâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/inode.c:108: sorry, unimplemented: inlining failed in call to âmake_le_item_headâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/inode.c:776: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/inode.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âcomp_keysâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:86: sorry, unimplemented: inlining failed in call to âcomp_short_keysâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:111: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âget_lkeyâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:61: sorry, unimplemented: inlining failed in call to âB_IS_IN_TREEâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:265: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âkey_in_bufferâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:294: sorry, unimplemented: inlining failed in call to âget_rkeyâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:356: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âprepare_for_delete_or_cutâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:74: sorry, unimplemented: inlining failed in call to âcopy_item_headâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:1041: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âreiserfs_delete_solid_itemâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:153: sorry, unimplemented: inlining failed in call to âle_key2cpu_keyâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:1335: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1
...
CC fs/reiserfs/stree.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c: In function âdecrement_counters_in_pathâ:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:362: sorry, unimplemented: inlining failed in call to âdecrement_bcountâ: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/reiserfs/stree.c:387: sorry, unimplemented: called from here
make[3]: *** [fs/reiserfs/stree.o] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxxx>

---

fs/reiserfs/do_balan.c | 4 ++--
fs/reiserfs/inode.c | 8 ++++----
fs/reiserfs/namei.c | 2 +-
fs/reiserfs/stree.c | 17 ++++++++---------
4 files changed, 15 insertions(+), 16 deletions(-)

da1507ac13cfd50db5dddc0186e0ff1f1ae26517 diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
index 7ee4208..42be2a6 100644
--- a/fs/reiserfs/do_balan.c
+++ b/fs/reiserfs/do_balan.c
@@ -29,8 +29,8 @@ struct tree_balance *cur_tb = NULL; /* detects whether more than one
is interrupting do_balance */
#endif

-inline void do_balance_mark_leaf_dirty(struct tree_balance *tb,
- struct buffer_head *bh, int flag)
+void do_balance_mark_leaf_dirty(struct tree_balance *tb,
+ struct buffer_head *bh, int flag)
{
journal_mark_dirty(tb->transaction_handle,
tb->transaction_handle->t_super, bh);
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 5791793..3e06b99 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -101,10 +101,10 @@ void make_cpu_key(struct cpu_key *key, struct inode *inode, loff_t offset,
//
// when key is 0, do not set version and short key
//
-inline void make_le_item_head(struct item_head *ih, const struct cpu_key *key,
- int version,
- loff_t offset, int type, int length,
- int entry_count /*or ih_free_space */ )
+void make_le_item_head(struct item_head *ih, const struct cpu_key *key,
+ int version,
+ loff_t offset, int type, int length,
+ int entry_count /*or ih_free_space */ )
{
if (key) {
ih->ih_key.k_dir_id = cpu_to_le32(key->on_disk_key.k_dir_id);
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 8867533..f592296 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -62,7 +62,7 @@ static inline void set_de_item_location(struct reiserfs_dir_entry *de,
}

// de_bh, de_ih, de_deh (points to first element of array), de_item_num is set
-inline void set_de_name_and_namelen(struct reiserfs_dir_entry *de)
+void set_de_name_and_namelen(struct reiserfs_dir_entry *de)
{
struct reiserfs_de_head *deh = de->de_deh + de->de_entry_num;

diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index d2db241..9b84b4c 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -57,7 +57,7 @@
#include <linux/quotaops.h>

/* Does the buffer contain a disk block which is in the tree. */
-inline int B_IS_IN_TREE(const struct buffer_head *p_s_bh)
+int B_IS_IN_TREE(const struct buffer_head *p_s_bh)
{

RFALSE(B_LEVEL(p_s_bh) > MAX_HEIGHT,
@@ -69,8 +69,7 @@ inline int B_IS_IN_TREE(const struct buffer_head *p_s_bh)
//
// to gets item head in le form
//
-inline void copy_item_head(struct item_head *p_v_to,
- const struct item_head *p_v_from)
+void copy_item_head(struct item_head *p_v_to, const struct item_head *p_v_from)
{
memcpy(p_v_to, p_v_from, IH_SIZE);
}
@@ -81,8 +80,8 @@ inline void copy_item_head(struct item_head *p_v_to,
Returns: -1 if key1 < key2
0 if key1 == key2
1 if key1 > key2 */
-inline int comp_short_keys(const struct reiserfs_key *le_key,
- const struct cpu_key *cpu_key)
+int comp_short_keys(const struct reiserfs_key *le_key,
+ const struct cpu_key *cpu_key)
{
__u32 n;
n = le32_to_cpu(le_key->k_dir_id);
@@ -150,7 +149,7 @@ inline int comp_short_le_keys(const struct reiserfs_key *key1,
return 0;
}

-inline void le_key2cpu_key(struct cpu_key *to, const struct reiserfs_key *from)
+void le_key2cpu_key(struct cpu_key *to, const struct reiserfs_key *from)
{
int version;
to->on_disk_key.k_dir_id = le32_to_cpu(from->k_dir_id);
@@ -289,8 +288,8 @@ static inline const struct reiserfs_key *get_lkey(const struct treepath
}

/* Get delimiting key of the buffer at the path and its right neighbor. */
-inline const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path,
- const struct super_block *p_s_sb)
+const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path,
+ const struct super_block *p_s_sb)
{
int n_position, n_path_offset = p_s_chk_path->path_length;
struct buffer_head *p_s_parent;
@@ -359,7 +358,7 @@ static inline int key_in_buffer(struct treepath *p_s_chk_path, /* Path which sho
return 1;
}

-inline void decrement_bcount(struct buffer_head *p_s_bh)
+void decrement_bcount(struct buffer_head *p_s_bh)
{
if (p_s_bh) {
if (atomic_read(&(p_s_bh->b_count))) {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/