• Arne Jansen's avatar
    Btrfs: fix race in run_clustered_refs · 22cd2e7d
    Arne Jansen authored
    With commit
    
    commit d1270cd9
    Author: Arne Jansen <sensille@gmx.net>
    Date:   Tue Sep 13 15:16:43 2011 +0200
    
         Btrfs: put back delayed refs that are too new
    
    I added a window where the delayed_ref's head->ref_mod code can diverge
    from the sum of the remaining refs, because we release the head->mutex
    in the middle. This leads to btrfs_lookup_extent_info returning wrong
    numbers. This patch fixes this by adjusting the head's ref_mod with each
    delayed ref we run.
    Signed-off-by: default avatarArne Jansen <sensille@gmx.net>
    Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
    22cd2e7d
extent-tree.c 215 KB