mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
jbd: Annotate transaction start also for journal_restart()
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>
This commit is contained in:
parent
9c28cbccec
commit
3adae9da0b
1 changed files with 3 additions and 3 deletions
|
@ -229,6 +229,8 @@ repeat_locked:
|
||||||
__log_space_left(journal));
|
__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);
|
||||||
|
@ -293,9 +295,6 @@ handle_t *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;
|
||||||
}
|
}
|
||||||
|
@ -417,6 +416,7 @@ int journal_restart(handle_t *handle, int nblocks)
|
||||||
__log_start_commit(journal, transaction->t_tid);
|
__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;
|
||||||
|
|
Loading…
Reference in a new issue