Skip to content

Commit

Permalink
jbd: Annotate transaction start also for journal_restart()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jankara committed Sep 16, 2009
1 parent 9c28cbc commit 3adae9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/jbd/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
__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);
Expand Down Expand Up @@ -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);

out:
return handle;
}
Expand Down Expand Up @@ -417,6 +416,7 @@ int journal_restart(handle_t *handle, int nblocks)
__log_start_commit(journal, transaction->t_tid);
spin_unlock(&journal->j_state_lock);

lock_map_release(&handle->h_lockdep_map);
handle->h_buffer_credits = nblocks;
ret = start_this_handle(journal, handle);
return ret;
Expand Down

0 comments on commit 3adae9d

Please sign in to comment.