From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Kemeng Shi <shikemeng@huaweicloud.com>,
Ojaswin Mujoo <ojaswin@linux.ibm.com>,
Theodore Ts'o <tytso@mit.edu>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 1/6] ext4: remove unnecessary e4b->bd_buddy_page check in ext4_mb_load_buddy_gfp
Date: Wed, 25 Feb 2026 08:22:57 -0500 [thread overview]
Message-ID: <20260225132302.222887-1-sashal@kernel.org> (raw)
In-Reply-To: <2026022401-arose-calm-3e73@gregkh>
From: Kemeng Shi <shikemeng@huaweicloud.com>
[ Upstream commit 285164b80175157c18a06425cf25591c9f942b1a ]
e4b->bd_buddy_page is only set if we initialize ext4_buddy successfully. So
e4b->bd_buddy_page is always NULL in error handle branch. Just remove the
dead check.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20230303172120.3800725-11-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Stable-dep-of: bdc56a9c46b2 ("ext4: fix e4b bitmap inconsistency reports")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/mballoc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index da0c63897190b..bf53a6b283ae4 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1601,8 +1601,7 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group,
put_page(page);
if (e4b->bd_bitmap_page)
put_page(e4b->bd_bitmap_page);
- if (e4b->bd_buddy_page)
- put_page(e4b->bd_buddy_page);
+
e4b->bd_buddy = NULL;
e4b->bd_bitmap = NULL;
return ret;
--
2.51.0
next prev parent reply other threads:[~2026-02-25 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 21:45 FAILED: patch "[PATCH] ext4: fix e4b bitmap inconsistency reports" failed to apply to 6.1-stable tree gregkh
2026-02-25 13:22 ` Sasha Levin [this message]
2026-02-25 13:22 ` [PATCH 6.1.y 2/6] ext4: convert some BUG_ON's in mballoc to use WARN_RATELIMITED instead Sasha Levin
2026-02-25 13:22 ` [PATCH 6.1.y 3/6] ext4: delete redundant calculations in ext4_mb_get_buddy_page_lock() Sasha Levin
2026-02-25 13:23 ` [PATCH 6.1.y 4/6] ext4: convert bd_bitmap_page to bd_bitmap_folio Sasha Levin
2026-02-25 13:23 ` [PATCH 6.1.y 5/6] ext4: convert bd_buddy_page to bd_buddy_folio Sasha Levin
2026-02-25 13:23 ` [PATCH 6.1.y 6/6] ext4: fix e4b bitmap inconsistency reports Sasha Levin
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=20260225132302.222887-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=shikemeng@huaweicloud.com \
--cc=stable@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.