aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKemeng Shi <[email protected]>2024-08-01 09:38:09 +0800
committerTheodore Ts'o <[email protected]>2024-08-26 23:49:15 -0400
commitf2917bda8a5c97be41c34e7761863a724097cf91 (patch)
tree7985ca97077d7697b52ea17600e574aa7890baff
parentf0e3c14802515f60a47e6ef347ea59c2733402aa (diff)
jbd2: remove dead check in journal_alloc_journal_head
We will alloc journal_head with __GFP_NOFAIL anyway, test for failure is pointless. Signed-off-by: Kemeng Shi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
-rw-r--r--fs/jbd2/journal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 33a975193f1f..326373ab022a 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2866,8 +2866,7 @@ static struct journal_head *journal_alloc_journal_head(void)
ret = kmem_cache_zalloc(jbd2_journal_head_cache,
GFP_NOFS | __GFP_NOFAIL);
}
- if (ret)
- spin_lock_init(&ret->b_state_lock);
+ spin_lock_init(&ret->b_state_lock);
return ret;
}