Skip to contentSkip to conversation

jbd2: fix warning if CONFIG_JBD2_DEBUG is not used

PATCH In review Christoph Fritz 2 participants 2 messages Aug 11, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jbd2: fix warning if CONFIG_JBD2_DEBUG is not used

Commit 8dd420466c7bfc459fa04680bd5690bfc41a4553 makes variable ts unused when CONFIG_JBD2_DEBUG is not used. This patch ifdefs it too.

fs/jbd2/transaction.c: In function ‘start_this_handle’:
fs/jbd2/transaction.c:98: warning: unused variable ‘ts’

---
 fs/jbd2/transaction.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/jbd2/transaction.c +2 -0
index d95cc9d..745d3b2 100644
@@ -95,7 +95,9 @@ static int start_this_handle(journal_t *journal, handle_t *handle,
 	int needed;
 	int nblocks = handle->h_buffer_credits;
 	transaction_t *new_transaction = NULL;
+#ifdef CONFIG_JBD2_DEBUG
 	unsigned long ts = jiffies;
+#endif
 
 	if (nblocks > journal->j_max_transaction_buffers) {
 		printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
Signature · 8 lines
1.7.1



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw
Quoted 7 lines · Christoph Fritz

Commit 8dd420466c7bfc459fa04680bd5690bfc41a4553 makes variable ts unused when CONFIG_JBD2_DEBUG is not used. This patch ifdefs it too.

fs/jbd2/transaction.c: In function ‘start_this_handle’:
fs/jbd2/transaction.c:98: warning: unused variable ‘ts’

I have a patch queued up to fix this already, using an approach suggested by Linus.

- Ted