summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKirill Korotaev <dev@openvz.org>2007-02-26 01:48:36 +0100
committerAdrian Bunk <bunk@stusta.de>2007-02-26 01:48:36 +0100
commit4c8a6fed53c2c10604a7c762d1bd31388709c4ac (patch)
tree6b75274f237f004e198041267e564ecd72a6942f /fs
parent9586568a59bf51bc50768f00a076a1e03e55eebc (diff)
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 <vvs@sw.ru> and Andrey Savochkin <saw@sawoct.com> Test case triggered the issue was created by Dmitry Monakhov <dmonakhov@sw.ru> Signed-Off-By: Kirill Korotaev <dev@openvz.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext3/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 4fafef3c511f..ef05ecef0d91 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 */