Btrfs: introduce grab/put functions for the root of the fs/file tree
[linux-2.6-block.git] / fs / btrfs / extent-tree.c
index c989fe602fafb47aa8e15ca3ebb4c71104c3efb9..04066c2cc7116ec8345b0ddf6e6f61539272a478 100644 (file)
@@ -7469,7 +7469,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
        } else {
                free_extent_buffer(root->node);
                free_extent_buffer(root->commit_root);
-               kfree(root);
+               btrfs_put_fs_root(root);
        }
 out_end_trans:
        btrfs_end_transaction_throttle(trans, tree_root);