diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 18:14:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 18:14:44 -0400 |
commit | b983471794e568fd71fa767da77a62ba517c3e63 (patch) | |
tree | 92a1cc26c4846b49d90225d004ba1b7bd6fe3d81 /fs/btrfs/async-thread.c | |
parent | 5a3ae276057840f0e60664c12fc3ef80aa59d1d4 (diff) | |
parent | c293498be69816087746161338de4b81efdf69fc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: BUG to BUG_ON changes
Btrfs: remove dead code
Btrfs: remove dead code
Btrfs: fix typos in comments
Btrfs: remove unused ftrace include
Btrfs: fix __ucmpdi2 compile bug on 32 bit builds
Btrfs: free inode struct when btrfs_new_inode fails
Btrfs: fix race in worker_loop
Btrfs: add flushoncommit mount option
Btrfs: notreelog mount option
Btrfs: introduce btrfs_show_options
Btrfs: rework allocation clustering
Btrfs: Optimize locking in btrfs_next_leaf()
Btrfs: break up btrfs_search_slot into smaller pieces
Btrfs: kill the pinned_mutex
Btrfs: kill the block group alloc mutex
Btrfs: clean up find_free_extent
Btrfs: free space cache cleanups
Btrfs: unplug in the async bio submission threads
Btrfs: keep processing bios for a given bdev if our proc is batching
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r-- | fs/btrfs/async-thread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index c84ca1f5259a..51bfdfc8fcda 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/freezer.h> | 22 | #include <linux/freezer.h> |
23 | #include <linux/ftrace.h> | ||
24 | #include "async-thread.h" | 23 | #include "async-thread.h" |
25 | 24 | ||
26 | #define WORK_QUEUED_BIT 0 | 25 | #define WORK_QUEUED_BIT 0 |
@@ -195,6 +194,9 @@ again_locked: | |||
195 | if (!list_empty(&worker->pending)) | 194 | if (!list_empty(&worker->pending)) |
196 | continue; | 195 | continue; |
197 | 196 | ||
197 | if (kthread_should_stop()) | ||
198 | break; | ||
199 | |||
198 | /* still no more work?, sleep for real */ | 200 | /* still no more work?, sleep for real */ |
199 | spin_lock_irq(&worker->lock); | 201 | spin_lock_irq(&worker->lock); |
200 | set_current_state(TASK_INTERRUPTIBLE); | 202 | set_current_state(TASK_INTERRUPTIBLE); |
@@ -208,7 +210,8 @@ again_locked: | |||
208 | worker->working = 0; | 210 | worker->working = 0; |
209 | spin_unlock_irq(&worker->lock); | 211 | spin_unlock_irq(&worker->lock); |
210 | 212 | ||
211 | schedule(); | 213 | if (!kthread_should_stop()) |
214 | schedule(); | ||
212 | } | 215 | } |
213 | __set_current_state(TASK_RUNNING); | 216 | __set_current_state(TASK_RUNNING); |
214 | } | 217 | } |