diff options
author | Andi Shyti <andi@etezian.org> | 2013-08-28 14:00:00 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-08-28 14:00:00 -0400 |
commit | 27b1b22882d32aa711ab4801700dad997440d940 (patch) | |
tree | d7e1da3eac994ca4af12b588ab20379bfb6211b3 | |
parent | 90e775b71ac4e685898c7995756fe58c135adaa6 (diff) |
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: Andi Shyti <andi@etezian.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/extents.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 62b21ccea882..e7580aeb6fbc 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -2285,8 +2285,8 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, | |||
2285 | ext4_lblk_t block) | 2285 | ext4_lblk_t block) |
2286 | { | 2286 | { |
2287 | int depth = ext_depth(inode); | 2287 | int depth = ext_depth(inode); |
2288 | unsigned long len; | 2288 | unsigned long len = 0; |
2289 | ext4_lblk_t lblock; | 2289 | ext4_lblk_t lblock = 0; |
2290 | struct ext4_extent *ex; | 2290 | struct ext4_extent *ex; |
2291 | 2291 | ||
2292 | ex = path[depth].p_ext; | 2292 | ex = path[depth].p_ext; |
@@ -2323,7 +2323,6 @@ ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, | |||
2323 | ext4_es_insert_extent(inode, lblock, len, ~0, | 2323 | ext4_es_insert_extent(inode, lblock, len, ~0, |
2324 | EXTENT_STATUS_HOLE); | 2324 | EXTENT_STATUS_HOLE); |
2325 | } else { | 2325 | } else { |
2326 | lblock = len = 0; | ||
2327 | BUG(); | 2326 | BUG(); |
2328 | } | 2327 | } |
2329 | 2328 | ||