Thread (2 messages) 2 messages, 2 authors, 2011-09-04
STALE5421d

[patch 1/2] jbd2: remove an unneeded NULL check

From: Dan Carpenter <hidden>
Date: 2011-08-26 09:19:31
Also in: kernel-janitors
Subsystem: filesystems (vfs and infrastructure), journalling layer for block devices (jbd2), the rest · Maintainers: Alexander Viro, Christian Brauner, "Theodore Ts'o", Jan Kara, Linus Torvalds

We dereference "transaction" at the start of the function so the NULL
check isn't needed here.  It's not harmful, but it silences a static
checker warning when we remove this.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index a242f6f..8d7013c 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1143,8 +1143,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
 			       jh->b_next_transaction,
 			       jh->b_next_transaction ?
 			         jh->b_next_transaction->t_tid : 0,
-			       transaction,
-			       transaction ? transaction->t_tid : 0);
+			       transaction, transaction->t_tid);
 			BUG_ON(1);
 		}
 		/* And this case is illegal: we can't reuse another
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help