]> git.karo-electronics.de Git - karo-tx-linux.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:28 +0000 (11:20 -0400)
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: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext4/mballoc.c

index 917fe78d42bee0dc069332b3fddd86cc6ea572c2..f1c9a84c50a331f870d524a3a21a186e8d4ee53e 100644 (file)
@@ -1173,6 +1173,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)