linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/1 linux-next] jbd2: Fix sparse context imbalance warning
Date: Thu, 18 Sep 2014 16:44:55 -0400	[thread overview]
Message-ID: <20140918204455.GA26995@thunk.org> (raw)
In-Reply-To: <1411064974-18304-1-git-send-email-fabf@skynet.be>

On Thu, Sep 18, 2014 at 08:29:34PM +0200, Fabian Frederick wrote:
> spin_unlock after spin_lock only.
> 
> This fixes the following sparse warning:
> fs/jbd2/transaction.c:1102:20: warning: context imbalance
> in 'jbd2_journal_get_create_access' - different lock contexts for basic block
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

NAK, this is a case where I think it's better to make the static
analyzers better.  In any case sparse gives a lot of false positives
for this particular warning, so adding lines of code to try to shut up
sparse for every single false positive seems to be a losing
proposition.

I'll note that these sorts of bugs are much more easily picked up
using lockdep in any case, so we're probably better of just ignoring
these sorts of warnings.  Better to let the 0day kernel tester warn
for new sparse warnings, instead of trying to drive sparse warnings
down to zero.

Cheers,

					- Ted

  reply	other threads:[~2014-09-18 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 18:29 [PATCH 1/1 linux-next] jbd2: Fix sparse context imbalance warning Fabian Frederick
2014-09-18 20:44 ` Theodore Ts'o [this message]
2014-09-20  7:14   ` Fabian Frederick

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=20140918204455.GA26995@thunk.org \
    --to=tytso@mit.edu \
    --cc=fabf@skynet.be \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).