btrfs: Make btrfs_init_dummy_trans initialize trans' fs_info field
[sfrench/cifs-2.6.git] / fs / btrfs / tests / btrfs-tests.c
index e74278170806ea5daa08ac7e5c951bd1db832443..db72b3b6209e000e8d4a1a94507ed9185715dd28 100644 (file)
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013 Fusion IO.  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/fs.h>
@@ -232,11 +219,13 @@ void btrfs_free_dummy_block_group(struct btrfs_block_group_cache *cache)
        kfree(cache);
 }
 
-void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans)
+void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans,
+                           struct btrfs_fs_info *fs_info)
 {
        memset(trans, 0, sizeof(*trans));
        trans->transid = 1;
        trans->type = __TRANS_DUMMY;
+       trans->fs_info = fs_info;
 }
 
 int btrfs_run_sanity_tests(void)