Filipe Manana 3d770d44dd btrfs: avoid monopolizing a core when activating a swap file
commit 2c8507c63f5498d4ee4af404a8e44ceae4345056 upstream.

During swap activation we iterate over the extents of a file and we can
have many thousands of them, so we can end up in a busy loop monopolizing
a core. Avoid this by doing a voluntary reschedule after processing each
extent.

CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-09 13:23:33 +01:00
..
2024-12-14 19:44:35 +01:00
2024-11-08 16:20:47 +01:00
2021-09-22 12:26:25 +02:00
2024-12-14 19:44:56 +01:00
2024-02-23 08:25:03 +01:00
2023-09-23 11:00:06 +02:00
2022-06-14 18:11:41 +02:00
2019-12-17 19:55:30 +01:00
2019-09-18 16:59:14 -07:00
2019-09-18 16:59:14 -07:00
2024-07-05 09:08:31 +02:00
2023-01-18 11:41:44 +01:00