From 4c8a6fed53c2c10604a7c762d1bd31388709c4ac Mon Sep 17 00:00:00 2001 From: Kirill Korotaev Date: Mon, 26 Feb 2007 01:48:36 +0100 Subject: fix ext3 block bitmap leakage This patch fixes ext3 block bitmap leakage, which leads to the following fsck messages on _healthy_ filesystem: Block bitmap differences: -64159 -73707 All kernels up to 2.6.17 have this bug. Found by Vasily Averin and Andrey Savochkin Test case triggered the issue was created by Dmitry Monakhov Signed-Off-By: Kirill Korotaev Signed-off-by: Adrian Bunk --- fs/ext3/inode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs') diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 4fafef3c511..ef05ecef0d9 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -516,6 +516,7 @@ static int ext3_alloc_branch(handle_t *handle, struct inode *inode, branch[0].key = cpu_to_le32(parent); if (parent) { + keys = 1; for (n = 1; n < num; n++) { struct buffer_head *bh; /* Allocate the next block */ -- cgit v1.2.3-18-g5258