diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-01-16 16:20:53 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:34 -0400 |
commit | 6876d2ab784645291089dd6fb325d6793cfd1c22 (patch) | |
tree | 4b90c47fc20ff342a401a53230560e7fc41e4fb5 /fs/bcachefs/rebalance.c | |
parent | 952070908f9f47acb9e9ebd642570dd75f672edc (diff) | |
download | linux-stable-6876d2ab784645291089dd6fb325d6793cfd1c22.tar.gz linux-stable-6876d2ab784645291089dd6fb325d6793cfd1c22.tar.bz2 linux-stable-6876d2ab784645291089dd6fb325d6793cfd1c22.zip |
bcachefs: Add a cond_resched() to rebalance loop
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/rebalance.c')
-rw-r--r-- | fs/bcachefs/rebalance.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c index 9eb3ac856eed..d17e3c0b7d12 100644 --- a/fs/bcachefs/rebalance.c +++ b/fs/bcachefs/rebalance.c @@ -183,6 +183,8 @@ static int bch2_rebalance_thread(void *arg) prev_cputime = curr_cputime(); while (!kthread_wait_freezable(r->enabled)) { + cond_resched(); + start = jiffies; cputime = curr_cputime(); |