diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 79196eb1a1b36..9d6d646e1eb08 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4518,6 +4518,8 @@ int try_release_extent_mapping(struct page *page, gfp_t mask) /* once for us */ free_extent_map(em); + + cond_resched(); /* Allow large-extent preemption. */ } } return try_release_extent_state(tree, page, mask);