]> 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>
Fri, 4 Oct 2024 14:32:57 +0000 (16:32 +0200)
commit39c6e2e3bc44c3654570e6db7414fd95df9d0bbd
treebdfa165cacafbf407e145a130c3b9a65b8f3b389
parentdf480091e6f71f4d2b40636eeb549518571cc123
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