summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-27 16:36:02 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:53:49 -0500
commit1de2cfde93c20a0357ff1dffed901598470facf3 (patch)
tree703663cf72eee9c495be1dff499b6f85715a02df /fs
parent4e121c06adf53aae478ebce3035116595d063413 (diff)
downloadlinux-stable-1de2cfde93c20a0357ff1dffed901598470facf3.tar.gz
linux-stable-1de2cfde93c20a0357ff1dffed901598470facf3.tar.bz2
linux-stable-1de2cfde93c20a0357ff1dffed901598470facf3.zip
Btrfs: don't delete ordered roots from list during cleanup
During transaction cleanup after an abort we are just removing roots from the ordered roots list which is incorrect. We have a BUG_ON() to make sure that the root is still part of the ordered roots list when we put our ordered extent which we were tripping in this case. So do like we do everywhere else and just move it to the tail of the ordered roots list and allow the normal cleanup to take care of stuff. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 113cd43530ba..01a26e2eb310 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3836,7 +3836,8 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info)
while (!list_empty(&splice)) {
root = list_first_entry(&splice, struct btrfs_root,
ordered_root);
- list_del_init(&root->ordered_root);
+ list_move_tail(&root->ordered_root,
+ &fs_info->ordered_roots);
btrfs_destroy_ordered_extents(root);