btrfs: Open code btrfs_write_and_wait_marked_extents