diff options
Diffstat (limited to 'fs/btrfs/async-thread.c')
| -rw-r--r-- | fs/btrfs/async-thread.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 0cc20b35c1c4..42704149b723 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
| @@ -171,11 +171,11 @@ out: | |||
| 171 | spin_unlock_irqrestore(&workers->lock, flags); | 171 | spin_unlock_irqrestore(&workers->lock, flags); |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static noinline int run_ordered_completions(struct btrfs_workers *workers, | 174 | static noinline void run_ordered_completions(struct btrfs_workers *workers, |
| 175 | struct btrfs_work *work) | 175 | struct btrfs_work *work) |
| 176 | { | 176 | { |
| 177 | if (!workers->ordered) | 177 | if (!workers->ordered) |
| 178 | return 0; | 178 | return; |
| 179 | 179 | ||
| 180 | set_bit(WORK_DONE_BIT, &work->flags); | 180 | set_bit(WORK_DONE_BIT, &work->flags); |
| 181 | 181 | ||
| @@ -213,7 +213,6 @@ static noinline int run_ordered_completions(struct btrfs_workers *workers, | |||
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | spin_unlock(&workers->order_lock); | 215 | spin_unlock(&workers->order_lock); |
| 216 | return 0; | ||
| 217 | } | 216 | } |
| 218 | 217 | ||
| 219 | static void put_worker(struct btrfs_worker_thread *worker) | 218 | static void put_worker(struct btrfs_worker_thread *worker) |
| @@ -399,7 +398,7 @@ again: | |||
| 399 | /* | 398 | /* |
| 400 | * this will wait for all the worker threads to shutdown | 399 | * this will wait for all the worker threads to shutdown |
| 401 | */ | 400 | */ |
| 402 | int btrfs_stop_workers(struct btrfs_workers *workers) | 401 | void btrfs_stop_workers(struct btrfs_workers *workers) |
| 403 | { | 402 | { |
| 404 | struct list_head *cur; | 403 | struct list_head *cur; |
| 405 | struct btrfs_worker_thread *worker; | 404 | struct btrfs_worker_thread *worker; |
| @@ -427,7 +426,6 @@ int btrfs_stop_workers(struct btrfs_workers *workers) | |||
| 427 | put_worker(worker); | 426 | put_worker(worker); |
| 428 | } | 427 | } |
| 429 | spin_unlock_irq(&workers->lock); | 428 | spin_unlock_irq(&workers->lock); |
| 430 | return 0; | ||
| 431 | } | 429 | } |
| 432 | 430 | ||
| 433 | /* | 431 | /* |
| @@ -615,14 +613,14 @@ found: | |||
| 615 | * it was taken from. It is intended for use with long running work functions | 613 | * it was taken from. It is intended for use with long running work functions |
| 616 | * that make some progress and want to give the cpu up for others. | 614 | * that make some progress and want to give the cpu up for others. |
| 617 | */ | 615 | */ |
| 618 | int btrfs_requeue_work(struct btrfs_work *work) | 616 | void btrfs_requeue_work(struct btrfs_work *work) |
| 619 | { | 617 | { |
| 620 | struct btrfs_worker_thread *worker = work->worker; | 618 | struct btrfs_worker_thread *worker = work->worker; |
| 621 | unsigned long flags; | 619 | unsigned long flags; |
| 622 | int wake = 0; | 620 | int wake = 0; |
| 623 | 621 | ||
| 624 | if (test_and_set_bit(WORK_QUEUED_BIT, &work->flags)) | 622 | if (test_and_set_bit(WORK_QUEUED_BIT, &work->flags)) |
| 625 | goto out; | 623 | return; |
| 626 | 624 | ||
| 627 | spin_lock_irqsave(&worker->lock, flags); | 625 | spin_lock_irqsave(&worker->lock, flags); |
| 628 | if (test_bit(WORK_HIGH_PRIO_BIT, &work->flags)) | 626 | if (test_bit(WORK_HIGH_PRIO_BIT, &work->flags)) |
| @@ -649,9 +647,6 @@ int btrfs_requeue_work(struct btrfs_work *work) | |||
| 649 | if (wake) | 647 | if (wake) |
| 650 | wake_up_process(worker->task); | 648 | wake_up_process(worker->task); |
| 651 | spin_unlock_irqrestore(&worker->lock, flags); | 649 | spin_unlock_irqrestore(&worker->lock, flags); |
| 652 | out: | ||
| 653 | |||
| 654 | return 0; | ||
| 655 | } | 650 | } |
| 656 | 651 | ||
| 657 | void btrfs_set_work_high_prio(struct btrfs_work *work) | 652 | void btrfs_set_work_high_prio(struct btrfs_work *work) |
