btrfs: Remove fs_info from btrfs_del_root
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Wed, 1 Aug 2018 03:32:27 +0000 (11:32 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:13:00 +0000 (13:13 +0200)
It can be referenced from the passed transaction handle.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-tree.c
fs/btrfs/qgroup.c
fs/btrfs/root-tree.c

index 2e32584c635ff43591546252e86a77cb61788ade..9ef47a171e2f53c51ce02199515596c72b520494 100644 (file)
@@ -2993,7 +2993,7 @@ int btrfs_del_root_ref(struct btrfs_trans_handle *trans,
                       u64 root_id, u64 ref_id, u64 dirid, u64 *sequence,
                       const char *name, int name_len);
 int btrfs_del_root(struct btrfs_trans_handle *trans,
-                  struct btrfs_fs_info *fs_info, const struct btrfs_key *key);
+                  const struct btrfs_key *key);
 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
                      const struct btrfs_key *key,
                      struct btrfs_root_item *item);
index fcaf598f4222c166ce5761e66f26a252383ed100..042dd4186fb8ce9a0d1382062aa3501422f14363 100644 (file)
@@ -9028,7 +9028,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
        if (err)
                goto out_end_trans;
 
-       ret = btrfs_del_root(trans, fs_info, &root->root_key);
+       ret = btrfs_del_root(trans, &root->root_key);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                err = ret;
index b5950aacd6975170c59dc3de29ed216eb9d49ffc..d6736595ec572995690f0268a623b4f53bb3e979 100644 (file)
@@ -1236,7 +1236,7 @@ int btrfs_clear_free_space_tree(struct btrfs_fs_info *fs_info)
        if (ret)
                goto abort;
 
-       ret = btrfs_del_root(trans, fs_info, &free_space_root->root_key);
+       ret = btrfs_del_root(trans, &free_space_root->root_key);
        if (ret)
                goto abort;
 
index e11ed7b3f32a9d6c694827798f9acdfcc2689a50..4353bb69bb8672267286562c1bdd629fecca4e9b 100644 (file)
@@ -1088,7 +1088,7 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info)
                goto end_trans;
        }
 
-       ret = btrfs_del_root(trans, fs_info, &quota_root->root_key);
+       ret = btrfs_del_root(trans, &quota_root->root_key);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                goto end_trans;
index c451285976acbf0dd91202dfe9644eeb03e4ef53..f7c14c454f910e34acbce80dcd5ab6f59ad2d064 100644 (file)
@@ -320,9 +320,9 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
 
 /* drop the root item for 'key' from the tree root */
 int btrfs_del_root(struct btrfs_trans_handle *trans,
-                  struct btrfs_fs_info *fs_info, const struct btrfs_key *key)
+                  const struct btrfs_key *key)
 {
-       struct btrfs_root *root = fs_info->tree_root;
+       struct btrfs_root *root = trans->fs_info->tree_root;
        struct btrfs_path *path;
        int ret;