diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-09-25 23:27:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:10 -0400 |
commit | c2fcff5973c93af7ffa87ad28eca2fddd2be83c5 (patch) | |
tree | cec9c018bc69b9bf90f88394dca7a817c0e6d442 /fs/bcachefs/util.c | |
parent | d06182cadb5bbd9ab7fa3d3e59608bb573bffbee (diff) | |
download | lwn-c2fcff5973c93af7ffa87ad28eca2fddd2be83c5.tar.gz lwn-c2fcff5973c93af7ffa87ad28eca2fddd2be83c5.zip |
bcachefs: Fix suspend when moving data faster than ratelimit
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index 6666c3aed05f..75053322d0f0 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -424,27 +424,6 @@ void bch2_ratelimit_increment(struct bch_ratelimit *d, u64 done) d->next = now - NSEC_PER_SEC * 2; } -int bch2_ratelimit_wait_freezable_stoppable(struct bch_ratelimit *d) -{ - bool kthread = (current->flags & PF_KTHREAD) != 0; - - while (1) { - u64 delay = bch2_ratelimit_delay(d); - - if (delay) - set_current_state(TASK_INTERRUPTIBLE); - - if (kthread && kthread_should_stop()) - return 1; - - if (!delay) - return 0; - - schedule_timeout(delay); - try_to_freeze(); - } -} - /* pd controller: */ /* |