diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2024-08-01 09:38:09 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-08-26 23:49:15 -0400 |
commit | f2917bda8a5c97be41c34e7761863a724097cf91 (patch) | |
tree | 7985ca97077d7697b52ea17600e574aa7890baff /fs/jbd2 | |
parent | f0e3c14802515f60a47e6ef347ea59c2733402aa (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 <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>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 3 |
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; } |