mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 11:12:01 -04:00
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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user