6e8aeb2 fsck.gfs2: avoid negative number in leaf depth

Authored and Committed by rpeterso 10 years ago
    fsck.gfs2: avoid negative number in leaf depth
    
    If a leaf block appears many times by mistake in the same hash table,
    there's a chance it belongs in a different directory's hash table, and
    was put there by mistake. In that case, the leaf depth may be too
    big for the directory in which it improperly appears. When that happens,
    function check_leaf_depth can come up with a negative number when it
    calculates the depth. This patch prevents the negative leaf depth error
    by flagging an error when it determines the leaf depth is wrong.
    The error causes pass2 to relocate the leaf to lost+found when it returns.
    
    rhbz#984085
    
        
file modified
+3 -0