Commit 27763692 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Add a cond_resched() call to journal_keys_sort()

We're just doing cpu work here and it could take awhile, a
cond_resched() is definitely needed.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent bb6c4b92
......@@ -543,6 +543,8 @@ static int journal_keys_sort(struct bch_fs *c)
if (!i || i->ignore)
continue;
cond_resched();
for_each_jset_key(k, entry, &i->j) {
if (keys->nr == keys->size) {
__journal_keys_sort(keys);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment