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>
Link: https://patch.msgid.link/20260207022920.258247-1-nikic.milos@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
* 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)
{
__rsv_window_dump((root), (verbose), __func__)
#else
#define rsv_window_dump(root, verbose) do {} while (0)
-#endif
+#endif /* EXT2FS_DEBUG */
/**
* goal_in_my_reservation()