public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: carrion bent <carrionbent@163.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: linux-ext4@vger.kernel.org, carrion bent <carrionbent@163.com>
Subject: [PATCH] ext4:fix macro definition error of EXT4_DIRENT_HASH and EXT4_DIRENT_MINOR_HASH
Date: Mon,  3 Jun 2024 18:57:19 +0800	[thread overview]
Message-ID: <1717412239-31392-1-git-send-email-carrionbent@163.com> (raw)

the macro parameter "entry" of EXT4_DIRENT_HASH and
EXT4_DIRENT_MINOR_HASH was not used, but rather the
variable de was directly used, which may be a local
variable inside a function that calls the macros

Signed-off-by: carrion bent <carrionbent@163.com>
---
 fs/ext4/ext4.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 983dad8..04bdd27 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2338,9 +2338,9 @@ struct ext4_dir_entry_2 {
 	((struct ext4_dir_entry_hash *) \
 		(((void *)(entry)) + \
 		((8 + (entry)->name_len + EXT4_DIR_ROUND) & ~EXT4_DIR_ROUND)))
-#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(de)->hash)
+#define EXT4_DIRENT_HASH(entry) le32_to_cpu(EXT4_DIRENT_HASHES(entry)->hash)
 #define EXT4_DIRENT_MINOR_HASH(entry) \
-		le32_to_cpu(EXT4_DIRENT_HASHES(de)->minor_hash)
+		le32_to_cpu(EXT4_DIRENT_HASHES(entry)->minor_hash)
 
 static inline bool ext4_hash_in_dirent(const struct inode *inode)
 {
-- 
2.7.4


             reply	other threads:[~2024-06-03 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 10:57 carrion bent [this message]
2024-06-04 17:30 ` [PATCH] ext4:fix macro definition error of EXT4_DIRENT_HASH and EXT4_DIRENT_MINOR_HASH Eric Biggers
2024-06-06  5:43 ` [PATCH v2] ext4: fix " carrion bent
2024-07-19 12:21   ` Jan Kara
2024-08-22 15:00   ` Theodore Ts'o

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=1717412239-31392-1-git-send-email-carrionbent@163.com \
    --to=carrionbent@163.com \
    --cc=adilger.kernel@dilger.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox