873b450 fsck.gfs2: Fetch directory inodes early in pass2()

Authored and Committed by andyp 9 years ago
    fsck.gfs2: Fetch directory inodes early in pass2()
    
    pass2() reads directory inodes twice: once indirectly through
    check_dir() and again shortly afterwards to perform other checks on the
    inode. To remove the duplicate reads, this patch moves the inode loading
    outside of check_dir() and keeps it around for the further checks. In
    order to avoid adding a fsck_inode_put() at each return point, and to
    remove some levels of nesting, the directory checking has been moved
    into a new pass2_check_dir() function which accepts the inode as an
    argument. pass2() now fetches the inode, calls pass2_check_dir() and
    then puts the inode. The patch also adds failure checking for the
    fsck_load_inode() calls.
    
    Resolves: rhbz#1154726
    
    Signed-off-by: Andrew Price <anprice@redhat.com>
    
        
file modified
+10 -7
file modified
+1 -1
file modified
+125 -118