• Josef Bacik's avatar
    Btrfs: hold the tree mod lock in __tree_mod_log_rewind · f1ca7e98
    Josef Bacik authored
    We need to hold the tree mod log lock in __tree_mod_log_rewind since we walk
    forward in the tree mod entries, otherwise we'll end up with random entries and
    trip the BUG_ON() at the front of __tree_mod_log_rewind.  This fixes the panics
    people were seeing when running
    
    find /whatever -type f -exec btrfs fi defrag {} \;
    
    Thansk,
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    f1ca7e98
ctree.c 147 KB