diff options
author | Eric Biggers <ebiggers@google.com> | 2021-06-15 21:53:29 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-07-06 22:34:03 -0400 |
commit | 19e50aa76263793ae46e8a2540d238faaf1492ad (patch) | |
tree | 66b4f1a8b867c7f09d2216cfdd3a76a0603f4e30 /e2fsck/journal.c | |
parent | 0af9a7e9dc0f0ff1b55058dfdad349db09c5d150 (diff) | |
download | e2fsprogs-19e50aa76263793ae46e8a2540d238faaf1492ad.tar.gz |
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>
Diffstat (limited to 'e2fsck/journal.c')
-rw-r--r-- | e2fsck/journal.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c index 0128fbd3..16d5cf86 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -27,9 +27,7 @@ #include "problem.h" #include "uuid/uuid.h" -#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jfs-debug */ static int bh_count = 0; -#endif /* * Define USE_INODE_IO to use the inode_io.c / fileio.c codepaths. @@ -129,10 +127,8 @@ struct buffer_head *getblk(kdev_t kdev, unsigned long long blocknr, if (!bh) return NULL; -#ifdef CONFIG_JBD_DEBUG if (journal_enable_debug >= 3) bh_count++; -#endif jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n", blocknr, blocksize, bh_count); |