Commit 9599b0e5 authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o

jbd2: Annotate transaction start also for jbd2_journal_restart()

lockdep annotation for a transaction start has been at the end of
jbd2_journal_start(). But a transaction is also started from
jbd2_journal_restart(). Move the lockdep annotation to start_this_handle()
which covers both cases.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 553f9008
...@@ -238,6 +238,8 @@ static int start_this_handle(journal_t *journal, handle_t *handle) ...@@ -238,6 +238,8 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
__jbd2_log_space_left(journal)); __jbd2_log_space_left(journal));
spin_unlock(&transaction->t_handle_lock); spin_unlock(&transaction->t_handle_lock);
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
lock_map_acquire(&handle->h_lockdep_map);
out: out:
if (unlikely(new_transaction)) /* It's usually NULL */ if (unlikely(new_transaction)) /* It's usually NULL */
kfree(new_transaction); kfree(new_transaction);
...@@ -303,8 +305,6 @@ handle_t *jbd2_journal_start(journal_t *journal, int nblocks) ...@@ -303,8 +305,6 @@ handle_t *jbd2_journal_start(journal_t *journal, int nblocks)
handle = ERR_PTR(err); handle = ERR_PTR(err);
goto out; goto out;
} }
lock_map_acquire(&handle->h_lockdep_map);
out: out:
return handle; return handle;
} }
...@@ -426,6 +426,7 @@ int jbd2_journal_restart(handle_t *handle, int nblocks) ...@@ -426,6 +426,7 @@ int jbd2_journal_restart(handle_t *handle, int nblocks)
__jbd2_log_start_commit(journal, transaction->t_tid); __jbd2_log_start_commit(journal, transaction->t_tid);
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
lock_map_release(&handle->h_lockdep_map);
handle->h_buffer_credits = nblocks; handle->h_buffer_credits = nblocks;
ret = start_this_handle(journal, handle); ret = start_this_handle(journal, handle);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment