Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Apr 3, 2009
2 parents 5a3ae27 + c293498 commit b983471
Show file tree
Hide file tree
Showing 17 changed files with 982 additions and 544 deletions.
7 changes: 5 additions & 2 deletions fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/freezer.h>
#include <linux/ftrace.h>
#include "async-thread.h"

#define WORK_QUEUED_BIT 0
Expand Down Expand Up @@ -195,6 +194,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 +210,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
Loading

0 comments on commit b983471

Please sign in to comment.