diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-04 19:25:06 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:59 +0200 |
commit | 2776369266ad04095204128d72cf0d429b5fb678 (patch) | |
tree | 70f53e6236ffeda706b8f3dcee0ba568325ba538 /fs/bcachefs/recovery.c | |
parent | bcachefs: Improve trace_move_extent_fail() (diff) | |
download | linux-2776369266ad04095204128d72cf0d429b5fb678.tar.xz linux-2776369266ad04095204128d72cf0d429b5fb678.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/recovery.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 8cc8af6d29ef..91a66b5916eb 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -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); |