• Zhao Lei's avatar
    btrfs: fix condition of commit transaction · 94b947b2
    Zhao Lei authored
    Old code bypass commit transaction when we don't have enough
    pinned space, but another case is there exist freed bgs in current
    transction, it have possibility to make alloc_chunk success.
    
    This patch modify the condition to:
    if (have_free_bg || have_pinned_space) commit_transaction()
    
    Confirmed above action by printk before and after patch.
    Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    94b947b2
extent-tree.c 270 KB