All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: "Theodore Ts'o" <tytso@mit.edu>, Mingming Cao <cmm@us.ibm.com>
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: fix build failure if DX_DEBUG
Date: Wed, 11 Jun 2008 16:43:28 +0800	[thread overview]
Message-ID: <484F9030.2020800@cn.fujitsu.com> (raw)

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.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/ext4/namei.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index ab16bea..4315fd7 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -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));
-}

             reply	other threads:[~2008-06-11  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11  8:43 Li Zefan [this message]
2008-06-11 16:03 ` [PATCH] ext4: fix build failure if DX_DEBUG Eric Sandeen
2008-07-06  4:07   ` Theodore Tso
2008-07-06  4:10     ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=484F9030.2020800@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.