Skip to contentSkip to conversation

ext4: fix build failure if DX_DEBUG

PATCH In review Li Zefan 3 participants 4 messages Jun 11, 2008 – Jul 6, 2008 ext4 file system

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 ext4: fix build failure if DX_DEBUG

I got build failure when I turned on DX_DEBUG.

fs/ext4/namei.c: In function ‘dx_show_leaf’:
fs/ext4/namei.c:291: error: implicit declaration of function ‘ext4_next_entry’ fs/ext4/namei.c:291: warning: assignment makes pointer from integer without a cast

Move the definition of ext4_next_entry() upwards just as ext3 code.

---
 fs/ext4/namei.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
fs/ext4/namei.c +10 -7
index ab16bea..4315fd7 100644
@@ -183,6 +183,16 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
 			     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 inode *dir, __u32 hash,
 
 
 /*
- * 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));
-}
#1 lore raw
Quoted 9 lines · Li Zefan

I got build failure when I turned on DX_DEBUG.

fs/ext4/namei.c: In function ‘dx_show_leaf’:
fs/ext4/namei.c:291: error: implicit declaration of function ‘ext4_next_entry’ fs/ext4/namei.c:291: warning: assignment makes pointer from integer without a cast

Move the definition of ext4_next_entry() upwards just as ext3 code.

Thanks, I added this to the bugfix portion of the ext4 patch queue.

-Eric

Quoted 31 lines
---
 fs/ext4/namei.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
fs/ext4/namei.c +10 -2
index ab16bea..4315fd7 100644
@@ -183,6 +183,16 @@ static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
 			     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 inode *dir, __u32 hash,
 
 
 /*
- * p is at least 6 bytes before the end of page
- */

fs/ext4/namei.c static int ext4_htree_next_block(struct inode *dir, __u32 hash, · line 569

Quoted 10 lines
fs/ext4/namei.c +0 -7
-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.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#2 lore raw
Quoted 7 lines · Eric Sandeen
Quoted 6 lines · Li Zefan

I got build failure when I turned on DX_DEBUG.

fs/ext4/namei.c: In function ‘dx_show_leaf’:
fs/ext4/namei.c:291: error: implicit declaration of function ‘ext4_next_entry’ fs/ext4/namei.c:291: warning: assignment makes pointer from integer without a cast

Quoted 5 lines
Quoted 3 lines

Move the definition of ext4_next_entry() upwards just as ext3 code.

Thanks, I added this to the bugfix portion of the ext4 patch queue.

But you forgot to edit the series file. :-)

I've fixed in the patch queue, and it will be in the 2.6.26-rc9-ext4-1 patch drop.

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 10 lines · Theodore Tso
Quoted 9 lines · Eric Sandeen
Quoted 8 lines · Li Zefan

I got build failure when I turned on DX_DEBUG.

fs/ext4/namei.c: In function ‘dx_show_leaf’:
fs/ext4/namei.c:291: error: implicit declaration of function ‘ext4_next_entry’ fs/ext4/namei.c:291: warning: assignment makes pointer from integer without a cast

Move the definition of ext4_next_entry() upwards just as ext3 code.

Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Thanks, I added this to the bugfix portion of the ext4 patch queue.

But you forgot to edit the series file. :-)

I've fixed in the patch queue, and it will be in the 2.6.26-rc9-ext4-1 patch drop.

*sigh*

Thanks...

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html