]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
ext4: release page cache in ext4_mb_load_buddy error path
authorYang Ruirui <ruirui.r.yang@tieto.com>
Sat, 16 Apr 2011 23:17:48 +0000 (19:17 -0400)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:50 +0000 (13:54 -0700)
commit 26626f1172fb4f3f323239a6a5cf4e082643fa46 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/ext4/mballoc.c

index 12b3bc026a683cd7b321fbae0e32839e8764e571..994a719b995c66ec11d67c61f0b5d76e9ca7d04b 100644 (file)
@@ -1175,6 +1175,8 @@ repeat_load_buddy:
        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)