diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-05 15:43:03 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-09-09 09:41:46 -0400 |
commit | ec36573dcd7b160bb9c5e6b20a43d484bc761d2e (patch) | |
tree | 4df4c50f584f86c4e565324c773c6268f6d22777 | |
parent | 5a6e43af1e5341a11a719270cef9d846b0bbfaa5 (diff) |
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: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_journal_iter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_journal_iter.c b/fs/bcachefs/btree_journal_iter.c index 74933490aaba..c1657182c275 100644 --- a/fs/bcachefs/btree_journal_iter.c +++ b/fs/bcachefs/btree_journal_iter.c @@ -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) { |