From: Milos Nikic <nikic.milos@gmail.com>
To: jack@suse.com
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Milos Nikic <nikic.milos@gmail.com>
Subject: [PATCH] ext2: guard reservation window dump with EXT2FS_DEBUG
Date: Fri, 6 Feb 2026 18:29:20 -0800 [thread overview]
Message-ID: <20260207022920.258247-1-nikic.milos@gmail.com> (raw)
The function __rsv_window_dump() is a heavyweight debug tool that walks
the reservation red-black tree. It is currently guarded by #if 1,
forcing it to be compiled into all kernels, even production ones.
Match the rest of the file by guarding it with #ifdef EXT2FS_DEBUG,
so it is only included when explicit debugging is enabled.
This removes the unused function code from standard builds.
Signed-off-by: Milos Nikic <nikic.milos@gmail.com>
---
fs/ext2/balloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index b8cfab8f98b9..0fee01ed56d0 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -201,7 +201,7 @@ static void group_adjust_blocks(struct super_block *sb, int group_no,
* windows(start, end). Otherwise, it will only print out the "bad" windows,
* those windows that overlap with their immediate neighbors.
*/
-#if 1
+#ifdef EXT2FS_DEBUG
static void __rsv_window_dump(struct rb_root *root, int verbose,
const char *fn)
{
@@ -248,7 +248,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose,
__rsv_window_dump((root), (verbose), __func__)
#else
#define rsv_window_dump(root, verbose) do {} while (0)
-#endif
+#endif /* EXT2FS_DEBUG */
/**
* goal_in_my_reservation()
--
2.52.0
next reply other threads:[~2026-02-07 2:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-07 2:29 Milos Nikic [this message]
2026-02-27 5:06 ` Milos Nikic
2026-02-27 11:16 ` Jan Kara
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=20260207022920.258247-1-nikic.milos@gmail.com \
--to=nikic.milos@gmail.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®