提交 27b1b228 编写于 作者: A Andi Shyti 提交者: Theodore Ts'o

ext4: fix use of potentially uninitialized variables in debugging code

If ext_debugging is enabled and path[depth].p_ext is NULL, len
and lblock are printed non initialized
Signed-off-by: NAndi Shyti <andi@etezian.org>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 90e775b7
......@@ -2285,8 +2285,8 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path,
ext4_lblk_t block)
{
int depth = ext_depth(inode);
unsigned long len;
ext4_lblk_t lblock;
unsigned long len = 0;
ext4_lblk_t lblock = 0;
struct ext4_extent *ex;
ex = path[depth].p_ext;
......@@ -2323,7 +2323,6 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path,
ext4_es_insert_extent(inode, lblock, len, ~0,
EXTENT_STATUS_HOLE);
} else {
lblock = len = 0;
BUG();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册