You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] sem2mutex: jbd, j_checkpoint_mutex
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f24075bd0c
commit
2c68ee754c
+2
-2
@@ -85,7 +85,7 @@ void __log_wait_for_space(journal_t *journal)
|
||||
if (journal->j_flags & JFS_ABORT)
|
||||
return;
|
||||
spin_unlock(&journal->j_state_lock);
|
||||
down(&journal->j_checkpoint_sem);
|
||||
mutex_lock(&journal->j_checkpoint_mutex);
|
||||
|
||||
/*
|
||||
* Test again, another process may have checkpointed while we
|
||||
@@ -98,7 +98,7 @@ void __log_wait_for_space(journal_t *journal)
|
||||
log_do_checkpoint(journal);
|
||||
spin_lock(&journal->j_state_lock);
|
||||
}
|
||||
up(&journal->j_checkpoint_sem);
|
||||
mutex_unlock(&journal->j_checkpoint_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -659,8 +659,8 @@ static journal_t * journal_init_common (void)
|
||||
init_waitqueue_head(&journal->j_wait_checkpoint);
|
||||
init_waitqueue_head(&journal->j_wait_commit);
|
||||
init_waitqueue_head(&journal->j_wait_updates);
|
||||
init_MUTEX(&journal->j_barrier);
|
||||
init_MUTEX(&journal->j_checkpoint_sem);
|
||||
mutex_init(&journal->j_barrier);
|
||||
mutex_init(&journal->j_checkpoint_mutex);
|
||||
spin_lock_init(&journal->j_revoke_lock);
|
||||
spin_lock_init(&journal->j_list_lock);
|
||||
spin_lock_init(&journal->j_state_lock);
|
||||
|
||||
@@ -455,7 +455,7 @@ void journal_lock_updates(journal_t *journal)
|
||||
* to make sure that we serialise special journal-locked operations
|
||||
* too.
|
||||
*/
|
||||
down(&journal->j_barrier);
|
||||
mutex_lock(&journal->j_barrier);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -470,7 +470,7 @@ void journal_unlock_updates (journal_t *journal)
|
||||
{
|
||||
J_ASSERT(journal->j_barrier_count != 0);
|
||||
|
||||
up(&journal->j_barrier);
|
||||
mutex_unlock(&journal->j_barrier);
|
||||
spin_lock(&journal->j_state_lock);
|
||||
--journal->j_barrier_count;
|
||||
spin_unlock(&journal->j_state_lock);
|
||||
|
||||
Reference in New Issue
Block a user