]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: btrfs_relocate_chunk pass extent_root to btrfs_end_transaction
authorJeff Mahoney <jeffm@suse.com>
Fri, 24 Jun 2016 20:37:38 +0000 (16:37 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Jul 2016 11:54:25 +0000 (13:54 +0200)
In btrfs_relocate_chunk, we get a transaction handle via
btrfs_start_trans_remove_block_group, which starts the transaction
using the extent root.  When we call btrfs_end_transaction, we're calling
it using the chunk root.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c

index 104a2e42ed71cf28da186bd5187d704bf5f7cf79..359ac819a8eda65a145dc087e4c4d0ee01fed528 100644 (file)
@@ -2941,7 +2941,7 @@ static int btrfs_relocate_chunk(struct btrfs_root *root, u64 chunk_offset)
         * chunk tree entries
         */
        ret = btrfs_remove_chunk(trans, root, chunk_offset);
-       btrfs_end_transaction(trans, root);
+       btrfs_end_transaction(trans, extent_root);
        return ret;
 }