All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Carpenter <error27@gmail.com>
Cc: sct@redhat.com, linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: typo in jbd2_journal_begin_ordered_truncate()
Date: Tue, 3 Feb 2009 00:33:51 -0800	[thread overview]
Message-ID: <20090203003351.1efaa6db.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.00.0902012309120.26166@bikeee>

On Tue, 3 Feb 2009 11:23:03 +0300 (EAT) Dan Carpenter <error27@gmail.com> wrote:

> This is jbd2_journal_begin_ordered_truncate() from fs/jbd2/transaction.c.
> 
> I think the "&&" is supposed to be an "||" on line 2144.  Just knowing 
> that inode->i_transaction is NULL should be enough, otherwise we would 
> immediately dereference a null on line 2146.
> 
>    2144          if (!inode->i_transaction && !inode->i_next_transaction)
>    2145                  goto out;
>    2146          journal = inode->i_transaction->t_journal;
> 

Could be.  Hard to tell from the code, changelog and (non) comments.  Perhaps
it's dead code.

Send a patch, become famous ;)

While you're there, rename local var `inode' to `jinode'.

  reply	other threads:[~2009-02-03  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03  8:23 typo in jbd2_journal_begin_ordered_truncate() Dan Carpenter
2009-02-03  8:33 ` Andrew Morton [this message]
2009-02-03  9:02   ` Dan Carpenter
2009-02-03 14:23   ` Jan Kara

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=20090203003351.1efaa6db.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=error27@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sct@redhat.com \
    /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 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.