jbd2: move lockdep tracking to journal_s
Currently lockdep map is tracked in each journal handle. To be able to expand lockdep support to cover also other cases where we depend on transaction commit and where handle is not available, move lockdep map into struct journal_s. Since this makes the lockdep map shared for all handles, we have to use rwsem_acquire_read() for acquisitions now. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -1091,6 +1091,7 @@ static void jbd2_stats_proc_exit(journal_t *journal)
|
||||
|
||||
static journal_t * journal_init_common (void)
|
||||
{
|
||||
static struct lock_class_key jbd2_trans_commit_key;
|
||||
journal_t *journal;
|
||||
int err;
|
||||
|
||||
@@ -1126,6 +1127,9 @@ static journal_t * journal_init_common (void)
|
||||
|
||||
spin_lock_init(&journal->j_history_lock);
|
||||
|
||||
lockdep_init_map(&journal->j_trans_commit_map, "jbd2_handle",
|
||||
&jbd2_trans_commit_key, 0);
|
||||
|
||||
return journal;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user