btrfs: remove unused parameter fs_info from btrfs_extend_item
authorDavid Sterba <dsterba@suse.com>
Wed, 20 Mar 2019 13:51:10 +0000 (14:51 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:50 +0000 (19:02 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/dir-item.c
fs/btrfs/extent-tree.c
fs/btrfs/file-item.c
fs/btrfs/inode-item.c
fs/btrfs/tree-log.c
fs/btrfs/uuid-tree.c
fs/btrfs/xattr.c

index d8252bae0537afba5c79195b082fa5108cf944ad..eacd0b80e272d1eeed7c089df0361f8b6cfcb81c 100644 (file)
@@ -4639,8 +4639,7 @@ void btrfs_truncate_item(struct btrfs_path *path, u32 new_size, int from_end)
 /*
  * make the item pointed to by the path bigger, data_size is the added size.
  */
-void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
-                      u32 data_size)
+void btrfs_extend_item(struct btrfs_path *path, u32 data_size)
 {
        int slot;
        struct extent_buffer *leaf;
@@ -4669,7 +4668,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
        BUG_ON(slot < 0);
        if (slot >= nritems) {
                btrfs_print_leaf(leaf);
-               btrfs_crit(fs_info, "slot %d too large, nritems %d",
+               btrfs_crit(leaf->fs_info, "slot %d too large, nritems %d",
                           slot, nritems);
                BUG();
        }
index b6b570bcadaad528d88a9a732eda00add858718a..93318ab9ceb9764192909b2dac711a0476d905c7 100644 (file)
@@ -2930,8 +2930,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
                      struct extent_buffer **cow_ret, u64 new_root_objectid);
 int btrfs_block_can_be_shared(struct btrfs_root *root,
                              struct extent_buffer *buf);
-void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
-                      u32 data_size);
+void btrfs_extend_item(struct btrfs_path *path, u32 data_size);
 void btrfs_truncate_item(struct btrfs_path *path, u32 new_size, int from_end);
 int btrfs_split_item(struct btrfs_trans_handle *trans,
                     struct btrfs_root *root,
index 2120b61f61b8ac407a81d003e73fef6ff3487b98..863367c2c62052bee4a4faa457b44cadd934889d 100644 (file)
@@ -36,7 +36,7 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle
                di = btrfs_match_dir_item_name(fs_info, path, name, name_len);
                if (di)
                        return ERR_PTR(-EEXIST);
-               btrfs_extend_item(fs_info, path, data_size);
+               btrfs_extend_item(path, data_size);
        } else if (ret < 0)
                return ERR_PTR(ret);
        WARN_ON(ret > 0);
index 01dbc8bf68086308f037268671cc57799ca28ac2..2ac4ae41cfedbbfdf7a37d9c7ad9c36e78b24652 100644 (file)
@@ -1705,7 +1705,7 @@ void setup_inline_extent_backref(struct btrfs_fs_info *fs_info,
        type = extent_ref_type(parent, owner);
        size = btrfs_extent_inline_ref_size(type);
 
-       btrfs_extend_item(fs_info, path, size);
+       btrfs_extend_item(path, size);
 
        ei = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
        refs = btrfs_extent_refs(leaf, ei);
index 9f6ceb8eb45114ddf70c36c4557881994f3ae85f..5a3be16ca93d5f29d7a09d73614b56bbfcb6f999 100644 (file)
@@ -848,7 +848,7 @@ again:
                diff /= csum_size;
                diff *= csum_size;
 
-               btrfs_extend_item(fs_info, path, diff);
+               btrfs_extend_item(path, diff);
                ret = 0;
                goto csum;
        }
index 3e0f12d6d09455ffadfc4d172c1a9058d6a636bf..30d62ef918b92e1154df44cca39f17992705ffe8 100644 (file)
@@ -288,7 +288,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans,
                                                   name, name_len, NULL))
                        goto out;
 
-               btrfs_extend_item(root->fs_info, path, ins_len);
+               btrfs_extend_item(path, ins_len);
                ret = 0;
        }
        if (ret < 0)
@@ -347,7 +347,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
                        goto out;
 
                old_size = btrfs_item_size_nr(path->nodes[0], path->slots[0]);
-               btrfs_extend_item(fs_info, path, ins_len);
+               btrfs_extend_item(path, ins_len);
                ref = btrfs_item_ptr(path->nodes[0], path->slots[0],
                                     struct btrfs_inode_ref);
                ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size);
index 13aabbf13251aa618d6e64ddc5951cacc5b779ff..67cd144e6be1e130b17979ff8f1b373a5ee1014c 100644 (file)
@@ -344,7 +344,6 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
                                   struct extent_buffer *eb, int slot,
                                   struct btrfs_key *key)
 {
-       struct btrfs_fs_info *fs_info = root->fs_info;
        int ret;
        u32 item_size;
        u64 saved_i_size = 0;
@@ -467,8 +466,7 @@ insert:
                if (found_size > item_size)
                        btrfs_truncate_item(path, item_size, 1);
                else if (found_size < item_size)
-                       btrfs_extend_item(fs_info, path,
-                                         item_size - found_size);
+                       btrfs_extend_item(path, item_size - found_size);
        } else if (ret) {
                return ret;
        }
index 44838ad3a7f9fb77c442fb0f33c7b489d7d87d2e..91caab63bdf521e5e16f30cd0e8428fb7b242a3b 100644 (file)
@@ -121,7 +121,7 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
                 * An item with that type already exists.
                 * Extend the item and store the new subid at the end.
                 */
-               btrfs_extend_item(fs_info, path, sizeof(subid_le));
+               btrfs_extend_item(path, sizeof(subid_le));
                eb = path->nodes[0];
                slot = path->slots[0];
                offset = btrfs_item_ptr_offset(eb, slot);
index c5593d0922f509316c7f27574c975174bd694e87..cb45c02cdc44b6d9f588d85213ac4ff7e7827d38 100644 (file)
@@ -185,8 +185,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
                if (old_data_len + name_len + sizeof(*di) == item_size) {
                        /* No other xattrs packed in the same leaf item. */
                        if (size > old_data_len)
-                               btrfs_extend_item(fs_info, path,
-                                                 size - old_data_len);
+                               btrfs_extend_item(path, size - old_data_len);
                        else if (size < old_data_len)
                                btrfs_truncate_item(path, data_size, 1);
                } else {
@@ -194,7 +193,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
                        ret = btrfs_delete_one_dir_name(trans, root, path, di);
                        if (ret)
                                goto out;
-                       btrfs_extend_item(fs_info, path, data_size);
+                       btrfs_extend_item(path, data_size);
                }
 
                item = btrfs_item_nr(slot);