Home
last modified time | relevance | path

Searched hist:"1 eaa566d368b214d99cbb973647c1b0b8102a9ae" (Results 1 – 1 of 1) sorted by relevance

/linux/fs/jbd2/
H A Dtransaction.cdiff e03a9976afce6634826d56c33531dd10bb9a9166 Thu Sep 22 17:44:06 CEST 2016 Jan Kara <jack@suse.cz> jbd2: fix lockdep annotation in add_transaction_credits()

Thomas has reported a lockdep splat hitting in
add_transaction_credits(). The problem is that that function calls
jbd2_might_wait_for_commit() while holding j_state_lock which is wrong
(we do not really wait for transaction commit while holding that lock).

Fix the problem by moving jbd2_might_wait_for_commit() into places where
we are ready to wait for transaction commit and thus j_state_lock is
unlocked.

Cc: stable@vger.kernel.org
Fixes: 1eaa566d368b214d99cbb973647c1b0b8102a9ae
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff 1eaa566d368b214d99cbb973647c1b0b8102a9ae Thu Jun 30 17:40:54 CEST 2016 Jan Kara <jack@suse.cz> jbd2: track more dependencies on transaction commit

So far we were tracking only dependency on transaction commit due to
starting a new handle (which may require commit to start a new
transaction). Now add tracking also for other cases where we wait for
transaction commit. This way lockdep can catch deadlocks e. g. because we
call jbd2_journal_stop() for a synchronous handle with some locks held
which rank below transaction start.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>