Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140335
b: refs/heads/master
c: b5555f7
h: refs/heads/master
i:
  140333: b3e4251
  140331: 6787cb6
  140327: ff72555
  140319: d4c0d69
v: v3
  • Loading branch information
Amit Gud authored and Chris Mason committed Apr 2, 2009
1 parent 1398cf2 commit ffc1e02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dccae99995089641fbac452ebc7f0cab18751ddb
refs/heads/master: b5555f77115bfba3630fefff2d4e68140b644171
6 changes: 5 additions & 1 deletion trunk/fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ static int worker_loop(void *arg)
if (!list_empty(&worker->pending))
continue;

if (kthread_should_stop())
break;

/* still no more work?, sleep for real */
spin_lock_irq(&worker->lock);
set_current_state(TASK_INTERRUPTIBLE);
Expand All @@ -208,7 +211,8 @@ static int worker_loop(void *arg)
worker->working = 0;
spin_unlock_irq(&worker->lock);

schedule();
if (!kthread_should_stop())
schedule();
}
__set_current_state(TASK_RUNNING);
}
Expand Down

0 comments on commit ffc1e02

Please sign in to comment.