• Chris Mason's avatar
    Add a per-inode lock around btrfs_drop_extents · ee6e6504
    Chris Mason authored
    btrfs_drop_extents is always called with a range lock held on the inode.
    But, it may operate on extents outside that range as it drops and splits
    them.
    
    This patch adds a per-inode mutex that is held while calling
    btrfs_drop_extents and while inserting new extents into the tree.  It
    prevents races from two procs working against adjacent ranges in the tree.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    ee6e6504
extent-tree.c 88.3 KB