mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
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:
parent
f0e3c14802
commit
f2917bda8a
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user