ext4: fix build failure if DX_DEBUG is enabled From: Li Zefan ext4_next_entry() is used by the debugging function dx_show_leaf(), so it must be defined before that function. Signed-off-by: Li Zefan Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" --- fs/ext4/namei.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) Index: linux-2.6.26-rc9/fs/ext4/namei.c =================================================================== --- linux-2.6.26-rc9.orig/fs/ext4/namei.c 2008-07-11 16:04:55.000000000 -0700 +++ linux-2.6.26-rc9/fs/ext4/namei.c 2008-07-11 16:05:00.000000000 -0700 @@ -183,6 +183,16 @@ static int ext4_dx_add_entry(handle_t *h struct inode *inode); /* + * p is at least 6 bytes before the end of page + */ +static inline struct ext4_dir_entry_2 * +ext4_next_entry(struct ext4_dir_entry_2 *p) +{ + return (struct ext4_dir_entry_2 *)((char *)p + + ext4_rec_len_from_disk(p->rec_len)); +} + +/* * Future: use high four bits of block for coalesce-on-delete flags * Mask them off for now. */ @@ -554,15 +564,6 @@ static int ext4_htree_next_block(struct /* - * p is at least 6 bytes before the end of page - */ -static inline struct ext4_dir_entry_2 *ext4_next_entry(struct ext4_dir_entry_2 *p) -{ - return (struct ext4_dir_entry_2 *)((char *)p + - ext4_rec_len_from_disk(p->rec_len)); -} - -/* * This function fills a red-black tree with information from a * directory block. It returns the number directory entries loaded * into the tree. If there is an error it is returned in err.