Commit ec36573d authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Add a cond_resched() to __journal_keys_sort()



Without this, we'd potentially sort multiple times without a
cond_resched(), leading to hung task warnings on larger systems.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 5a6e43af
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -530,6 +530,8 @@ static void __journal_keys_sort(struct journal_keys *keys)
{
	sort(keys->data, keys->nr, sizeof(keys->data[0]), journal_sort_key_cmp, NULL);

	cond_resched();

	struct journal_key *dst = keys->data;

	darray_for_each(*keys, src) {