andyp / gfs2-utils

Forked from gfs2-utils a year ago
Clone

3e78a3c libgfs2: Make sure block_alloc() fails when out of space

Authored and Committed by andyp a year ago
    libgfs2: Make sure block_alloc() fails when out of space
    
    block_alloc() fails to fail when no resource group can satisfy the
    required free space, due to checking the rgt pointer which is only
    updated inside the loop.
    
    Check the tree node pointer for NULL instead of the rgrp pointer, which
    is only set inside the loop to cast the tree node pointer.
    
    Fixes: 915fb43e "libgfs2: Rework blk_alloc_i"
    Signed-off-by: Andrew Price <anprice@redhat.com>
    
        
file modified
+1 -1