• Josef Bacik's avatar
    btrfs: lock extent when doing inline extent in compression · 7034674b
    Josef Bacik authored
    
    
    We currently don't lock the extent when we're doing a
    cow_file_range_inline() for a compressed extent.  This isn't a problem
    necessarily, but it's inconsistent with the rest of our usage of
    cow_file_range_inline().  This also leads to some extra weird logic
    around whether the extent is locked or not.  Fix this to lock the extent
    before calling cow_file_range_inline() in compression to make it
    consistent with the rest of the inline users.  In future patches this
    will be pushed down into the cow_file_range_inline() helper, so we're
    fine with the quick and dirty locking here.  This patch exists to make
    the behavior change obvious.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    7034674b
inode.c 312 KB