Skip to content

Commit

Permalink
ext4: release page cache in ext4_mb_load_buddy error path
Browse files Browse the repository at this point in the history
Add missing page_cache_release in the error path of ext4_mb_load_buddy

Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
  • Loading branch information
Yang Ruirui authored and Theodore Ts'o committed Apr 16, 2011
1 parent a6360dd commit 26626f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,8 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
return 0;

err:
if (page)
page_cache_release(page);
if (e4b->bd_bitmap_page)
page_cache_release(e4b->bd_bitmap_page);
if (e4b->bd_buddy_page)
Expand Down

0 comments on commit 26626f1

Please sign in to comment.