Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128394
b: refs/heads/master
c: ad693af
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Jun 9, 2007
1 parent d37579c commit 1237689
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: facda1e787d43191a3368c322f682054991c41b8
refs/heads/master: ad693af684757478e5fcb225aef319cab7ba6c75
15 changes: 8 additions & 7 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,6 @@ void btrfs_transaction_cleaner(struct work_struct *work)
int ret;

INIT_LIST_HEAD(&dirty_roots);
mutex_lock(&root->fs_info->trans_mutex);
list_splice_init(&root->fs_info->dead_roots, &dirty_roots);
mutex_unlock(&root->fs_info->trans_mutex);

if (!list_empty(&dirty_roots)) {
drop_dirty_roots(root, &dirty_roots);
}
mutex_lock(&root->fs_info->fs_mutex);
mutex_lock(&root->fs_info->trans_mutex);
cur = root->fs_info->running_transaction;
Expand All @@ -396,6 +389,14 @@ void btrfs_transaction_cleaner(struct work_struct *work)
ret = btrfs_commit_transaction(trans, root);
out:
mutex_unlock(&root->fs_info->fs_mutex);

mutex_lock(&root->fs_info->trans_mutex);
list_splice_init(&root->fs_info->dead_roots, &dirty_roots);
mutex_unlock(&root->fs_info->trans_mutex);

if (!list_empty(&dirty_roots)) {
drop_dirty_roots(root, &dirty_roots);
}
btrfs_transaction_queue_work(root, delay);
}

Expand Down

0 comments on commit 1237689

Please sign in to comment.