diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-10-12 14:55:27 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-10-12 15:10:26 -0400 |
commit | 55fbb25501330038e1714905b9ddeb25d875c11c (patch) | |
tree | cecfd15e26bfd60d95eea8a373e42337239e7c8c /libbcachefs/util.c | |
parent | 0268bec14bcf64b25b5dd75a470be8e85cbe676d (diff) |
Update bcachefs sources to d7f6da1d60 bcachefs: fix missing include
Diffstat (limited to 'libbcachefs/util.c')
-rw-r--r-- | libbcachefs/util.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libbcachefs/util.c b/libbcachefs/util.c index 1272ea7..5cfaed5 100644 --- a/libbcachefs/util.c +++ b/libbcachefs/util.c @@ -421,27 +421,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: */ /* |