All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] jbd2: remove an unneeded NULL check
@ 2011-08-26  9:19 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-08-26  9:19 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

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 <error27@gmail.com>

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch 1/2] jbd2: remove an unneeded NULL check
@ 2011-08-26  9:19 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-08-26  9:19 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

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 <error27@gmail.com>

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch 1/2] jbd2: remove an unneeded NULL check
  2011-08-26  9:19 ` Dan Carpenter
@ 2011-09-04 14:15   ` Ted Ts'o
  -1 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2011-09-04 14:15 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

On Fri, Aug 26, 2011 at 12:19:31PM +0300, Dan Carpenter wrote:
> 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 <error27@gmail.com>

Thanks for pointing this out; I've merged in the fix.

       	   	    	      	   	  - Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 1/2] jbd2: remove an unneeded NULL check
@ 2011-09-04 14:15   ` Ted Ts'o
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2011-09-04 14:15 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

On Fri, Aug 26, 2011 at 12:19:31PM +0300, Dan Carpenter wrote:
> 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 <error27@gmail.com>

Thanks for pointing this out; I've merged in the fix.

       	   	    	      	   	  - Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-04 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26  9:19 [patch 1/2] jbd2: remove an unneeded NULL check Dan Carpenter
2011-08-26  9:19 ` Dan Carpenter
2011-09-04 14:15 ` Ted Ts'o
2011-09-04 14:15   ` Ted Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.