Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199007
b: refs/heads/master
c: ed3b3d3
h: refs/heads/master
i:
  199005: 59e60d4
  199003: 8c4cb38
  198999: 08f7b31
  198991: 4157287
  198975: 30fdb7b
v: v3
  • Loading branch information
Chris Mason committed May 25, 2010
1 parent d289015 commit 81ea2a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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: 11c65dccf70be9ace5dbd3906778e1a099b1fee1
refs/heads/master: ed3b3d314cd2f16fac42676839854a68cab2e22b
1 change: 1 addition & 0 deletions trunk/fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ static int worker_loop(void *arg)
if (!list_empty(&worker->pending) ||
!list_empty(&worker->prio_pending)) {
spin_unlock_irq(&worker->lock);
set_current_state(TASK_RUNNING);
goto again;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
snap_pending = 1;

WARN_ON(cur_trans != trans->transaction);
prepare_to_wait(&cur_trans->writer_wait, &wait,
TASK_UNINTERRUPTIBLE);

if (cur_trans->num_writers > 1)
timeout = MAX_SCHEDULE_TIMEOUT;
else if (should_grow)
Expand All @@ -1088,6 +1085,9 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
*/
btrfs_run_ordered_operations(root, 1);

prepare_to_wait(&cur_trans->writer_wait, &wait,
TASK_UNINTERRUPTIBLE);

smp_mb();
if (cur_trans->num_writers > 1 || should_grow)
schedule_timeout(timeout);
Expand Down

0 comments on commit 81ea2a8

Please sign in to comment.