Commit 26626f11 authored by Yang Ruirui's avatar Yang Ruirui Committed by Theodore Ts'o

ext4: release page cache in ext4_mb_load_buddy error path

Add missing page_cache_release in the error path of ext4_mb_load_buddy
Signed-off-by: default avatarYang Ruirui <ruirui.r.yang@tieto.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
parent a6360dd3
...@@ -1273,6 +1273,8 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group, ...@@ -1273,6 +1273,8 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
return 0; return 0;
err: err:
if (page)
page_cache_release(page);
if (e4b->bd_bitmap_page) if (e4b->bd_bitmap_page)
page_cache_release(e4b->bd_bitmap_page); page_cache_release(e4b->bd_bitmap_page);
if (e4b->bd_buddy_page) if (e4b->bd_buddy_page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment