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)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:12:15 +0000 (22:12 -0400)
commit5e5b2a56c57def1b41efd49596621504d7bcc61c
treef0dc1f2f51396e35398c48ff04a96f305866d42c
parent20cee68f5b44fdc2942d20f3172a262ec247b117
ext4: avoid buffer_head leak in ext4_mark_inode_used()

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>
fs/ext4/ialloc.c