Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: "open list:JOURNALLING LAYER..." <linux-ext4@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: [patch 1/2] jbd2: remove an unneeded NULL check
Date: Fri, 26 Aug 2011 12:19:31 +0300	[thread overview]
Message-ID: <20110826091931.GM5975@shale.localdomain> (raw)

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

             reply	other threads:[~2011-08-26  9:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  9:19 Dan Carpenter [this message]
2011-09-04 14:15 ` [patch 1/2] jbd2: remove an unneeded NULL check Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110826091931.GM5975@shale.localdomain \
    --to=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox