aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorCarlos Maiolino <cmaiolino@redhat.com>2012-10-01 15:50:54 -0400
committerJan Kara <jack@suse.cz>2012-10-09 17:21:42 -0400
commitaa9660196b250b850c9d06046c9f3b1eb965a708 (patch)
tree07834a02268c6ee2cb2b24921d049f6cc83ef511 /fs/ext3
parent9e2d8656f5e8aa214e66b462680cf86b210b74a8 (diff)
ext3: fix possible non-initialized variable on htree_dirblock_to_tree()
This is a backport of ext4 commit 90b0a9732 which fixes a possible non-initialized variable on htree_dirblock_to_tree(). Ext3 has the same non initialized variable, but, in any case it will be initialized by ext3_get_blocks_handle(), which will avoid the bug to be triggered, but, the non-initialized variable by htree_dirblock_to_tree() is still a bug. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 8f4fddac01a6..7f6c9384ee72 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -559,7 +559,7 @@ static int htree_dirblock_to_tree(struct file *dir_file,
559{ 559{
560 struct buffer_head *bh; 560 struct buffer_head *bh;
561 struct ext3_dir_entry_2 *de, *top; 561 struct ext3_dir_entry_2 *de, *top;
562 int err, count = 0; 562 int err = 0, count = 0;
563 563
564 dxtrace(printk("In htree dirblock_to_tree: block %d\n", block)); 564 dxtrace(printk("In htree dirblock_to_tree: block %d\n", block));
565 if (!(bh = ext3_bread (NULL, dir, block, 0, &err))) 565 if (!(bh = ext3_bread (NULL, dir, block, 0, &err)))