From: Wang Jianjian <wangjianjian0@foxmail.com>
To: linux-ext4@vger.kernel.org
Cc: Wang Jianjian <wangjianjian0@foxmail.com>
Subject: [PATCH] ext4: Fix incorrect offset
Date: Thu, 24 Aug 2023 23:23:24 +0800 [thread overview]
Message-ID: <tencent_F992989953734FD5DE3F88ECB2191A856206@qq.com> (raw)
The last argumen of ext4_check_dir_entry is dentry offset
int the file.
Signed-off-by: Wang Jianjian <wangjianjian0@foxmail.com>
---
fs/ext4/namei.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 94608b7df7e8..33ebd35025bf 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2261,8 +2261,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
top = data2 + len;
while ((char *)(de2 = ext4_next_entry(de, blocksize)) < top) {
if (ext4_check_dir_entry(dir, NULL, de, bh2, data2, len,
- (data2 + (blocksize - csum_size) -
- (char *) de))) {
+ (char *)de - data2)) {
brelse(bh2);
brelse(bh);
return -EFSCORRUPTED;
--
2.34.3
next reply other threads:[~2023-08-24 15:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 15:23 Wang Jianjian [this message]
2023-09-18 14:51 ` [PATCH] ext4: Fix incorrect offset Jan Kara
2023-10-06 18:06 ` 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=tencent_F992989953734FD5DE3F88ECB2191A856206@qq.com \
--to=wangjianjian0@foxmail.com \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).