btrfs: Make btrfs_init_dummy_trans initialize trans' fs_info field
[sfrench/cifs-2.6.git] / fs / btrfs / tests / qgroup-tests.c
index 160eb2fba72640c375d82154a94372c8a5722d1d..df4bcce20ba5fb2c6037ce775e0a9e09f636d6d4 100644 (file)
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013 Facebook.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License v2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
  */
 
 #include <linux/types.h>
@@ -37,7 +24,7 @@ static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr,
        u32 size = sizeof(*item) + sizeof(*iref) + sizeof(*block_info);
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, NULL);
 
        ins.objectid = bytenr;
        ins.type = BTRFS_EXTENT_ITEM_KEY;
@@ -87,7 +74,7 @@ static int add_tree_ref(struct btrfs_root *root, u64 bytenr, u64 num_bytes,
        u64 refs;
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, NULL);
 
        key.objectid = bytenr;
        key.type = BTRFS_EXTENT_ITEM_KEY;
@@ -137,7 +124,7 @@ static int remove_extent_item(struct btrfs_root *root, u64 bytenr,
        struct btrfs_path *path;
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, NULL);
 
        key.objectid = bytenr;
        key.type = BTRFS_EXTENT_ITEM_KEY;
@@ -171,7 +158,7 @@ static int remove_extent_ref(struct btrfs_root *root, u64 bytenr,
        u64 refs;
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, NULL);
 
        key.objectid = bytenr;
        key.type = BTRFS_EXTENT_ITEM_KEY;
@@ -226,7 +213,7 @@ static int test_no_shared_qgroup(struct btrfs_root *root,
        struct ulist *new_roots = NULL;
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, fs_info);
 
        test_msg("Qgroup basic add\n");
        ret = btrfs_create_qgroup(NULL, fs_info, BTRFS_FS_TREE_OBJECTID);
@@ -327,7 +314,7 @@ static int test_multiple_refs(struct btrfs_root *root,
        struct ulist *new_roots = NULL;
        int ret;
 
-       btrfs_init_dummy_trans(&trans);
+       btrfs_init_dummy_trans(&trans, fs_info);
 
        test_msg("Qgroup multiple refs test\n");