From 136d3e0703e807b14ed6f9b8a5a544b6ba08d940 Mon Sep 17 00:00:00 2001 From: Kemeng Shi Date: Tue, 14 May 2024 19:24:37 +0800 Subject: jbd2: remove dead check of JBD2_UNMOUNT in kjournald2 We always set JBD2_UNMOUNT with j_state_lock held in journal_kill_thread. In kjournald2, we check JBD2_UNMOUNT flag two times under the same j_state_lock. Then the second check is unnecessary. Signed-off-by: Kemeng Shi Reviewed-by: Zhang Yi Reviewed-by: Jan Kara Link: https://patch.msgid.link/20240514112438.1269037-9-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o --- fs/jbd2/journal.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/jbd2') diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 079b3eeaa4d5..c7869b187380 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -228,8 +228,6 @@ loop: if (transaction && time_after_eq(jiffies, transaction->t_expires)) should_sleep = 0; - if (journal->j_flags & JBD2_UNMOUNT) - should_sleep = 0; if (should_sleep) { write_unlock(&journal->j_state_lock); schedule(); -- cgit v1.2.3