diff options
author | 2024-08-01 09:38:09 +0800 | |
---|---|---|
committer | 2024-08-26 23:49:15 -0400 | |
commit | f2917bda8a5c97be41c34e7761863a724097cf91 (patch) | |
tree | 7985ca97077d7697b52ea17600e574aa7890baff | |
parent | jbd2: correctly compare tids with tid_geq function in jbd2_fc_begin_commit (diff) | |
download | wireguard-linux-f2917bda8a5c97be41c34e7761863a724097cf91.tar.xz wireguard-linux-f2917bda8a5c97be41c34e7761863a724097cf91.zip |
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>
-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; } |