From: Mingming Cao Date: Fri, 11 Jul 2008 23:27:31 +0000 (-0400) Subject: ext4: Fix ext4_mb_init_cache return error X-Git-Tag: firefly_0821_release~19682^2~51 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=31b481dc7c249eac0a108ec5dfc0d4aef2217e39;p=firefly-linux-kernel-4.4.55.git ext4: Fix ext4_mb_init_cache return error ext4_mb_init_cache() incorrectly always return EIO on success. This causes the caller of ext4_mb_init_cache() fail when it checks the return value. Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 6280ad3829d4..d429014071c0 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -809,6 +809,7 @@ static int ext4_mb_init_cache(struct page *page, char *incore) if (!buffer_uptodate(bh[i])) goto out; + err = 0; first_block = page->index * blocks_per_page; for (i = 0; i < blocks_per_page; i++) { int group;