The j_commit_[sequence/request] are updated with j_state_lock held during runtime. In kjournald2, two equality checks of j_commit_[sequence/request] are under the same j_state_lock, then the second check is unnecessary. Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> Reviewed-by: Zhang Yi <yi.zhang@xxxxxxxxxx> Reviewed-by: Jan Kara <jack@xxxxxxx> --- fs/jbd2/journal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 71568cb82db7..4f1ab68cdb6f 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -224,8 +224,6 @@ static int kjournald2(void *arg) prepare_to_wait(&journal->j_wait_commit, &wait, TASK_INTERRUPTIBLE); - if (journal->j_commit_sequence != journal->j_commit_request) - should_sleep = 0; transaction = journal->j_running_transaction; if (transaction && time_after_eq(jiffies, transaction->t_expires)) -- 2.30.0