Whamcloud - gitweb
libext2fs: improve jbd_debug() implementation
authorEric Biggers <ebiggers@google.com>
Wed, 16 Jun 2021 04:53:29 +0000 (21:53 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 7 Jul 2021 02:34:03 +0000 (22:34 -0400)
commit19e50aa76263793ae46e8a2540d238faaf1492ad
tree66b4f1a8b867c7f09d2216cfdd3a76a0603f4e30
parent0af9a7e9dc0f0ff1b55058dfdad349db09c5d150
libext2fs: improve jbd_debug() implementation

Make jbd_debug() do format string checking (but still get compiled away
to nothing) when --enable-jbd-debug isn't specified, similar to
commit d556435156b7 ("jbd2: avoid -Wempty-body warnings") on the kernel
side.  This should prevent --enable-jbd-debug from getting broken due to
bad jbd_debug() statements.  It also eliminates a -Wunused-variable
warning where a variable was only used in a jbd_debug() statement.

Also remove an alternative definition of jbd_debug() that was
conditional on CONFIG_JBD_DEBUG && !CONFIG_JBD_DEBUG, so was dead code.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/journal.c
e2fsck/journal.c
lib/ext2fs/kernel-jbd.h