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 <shikemeng@huaweicloud.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20240801013815.2393869-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
f0e3c14802
commit
f2917bda8a
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user