linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>
Subject: [PATCH 1/4] jbd: Annotate transaction start also for journal_restart()
Date: Fri, 14 Aug 2009 14:26:09 +0200	[thread overview]
Message-ID: <1250252772-13302-2-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1250252772-13302-1-git-send-email-jack@suse.cz>

lockdep annotation for a transaction start has been at the end of
journal_start(). But a transaction is also started from journal_restart(). Move
the lockdep annotation to start_this_handle() which covers both cases.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/jbd/transaction.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 833c167..006f9ad 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -229,6 +229,8 @@ repeat_locked:
 		  __log_space_left(journal));
 	spin_unlock(&transaction->t_handle_lock);
 	spin_unlock(&journal->j_state_lock);
+
+	lock_map_acquire(&handle->h_lockdep_map);
 out:
 	if (unlikely(new_transaction))		/* It's usually NULL */
 		kfree(new_transaction);
@@ -293,9 +295,6 @@ handle_t *journal_start(journal_t *journal, int nblocks)
 		handle = ERR_PTR(err);
 		goto out;
 	}
-
-	lock_map_acquire(&handle->h_lockdep_map);

  reply	other threads:[~2009-08-14 12:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 12:26 [PATCH 0/4] ext[34]: Fix deadlock between truncate and get_block() Jan Kara
2009-08-14 12:26 ` Jan Kara [this message]
2009-08-14 12:26 ` [PATCH 2/4] ext3: Fix possible deadlock between ext3_truncate() and ext3_get_blocks() Jan Kara
2009-08-14 23:41   ` Andrew Morton
2009-08-17 14:45     ` Jan Kara
2009-08-14 12:26 ` [PATCH 3/4] jbd2: Annotate transaction start also for jbd2_journal_restart() Jan Kara
2009-08-18  2:16   ` Theodore Tso
2009-08-14 12:26 ` [PATCH 4/4] ext4: Fix possible deadlock between ext4_truncate() and ext4_get_blocks() Jan Kara
2009-08-18  2:17   ` Theodore Tso

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=1250252772-13302-2-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).