]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: avoid buffer_head leak in ext4_mark_inode_used()
authorKemeng Shi <shikemeng@huaweicloud.com>
Tue, 20 Aug 2024 13:22:28 +0000 (21:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:57 +0000 (15:10 +0200)
commit9b638bcfff8f0290079e181636cbe3649fa129f5
tree389b074133bc41b1018c29cc54b1614d67ef6e3f
parent86964b59b506f6d01427086959f7f029639aaba6
ext4: avoid buffer_head leak in ext4_mark_inode_used()

[ Upstream commit 5e5b2a56c57def1b41efd49596621504d7bcc61c ]

Release inode_bitmap_bh from ext4_read_inode_bitmap() in
ext4_mark_inode_used() to avoid buffer_head leak.
By the way, remove unneeded goto for invalid ino when inode_bitmap_bh
is NULL.

Fixes: 8016e29f4362 ("ext4: fast commit recovery path")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://patch.msgid.link/20240820132234.2759926-2-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/ialloc.c