]> git.hungrycats.org Git - linux/commitdiff
btrfs: sink blocksize parameter to btrfs_init_new_buffer
authorDavid Sterba <dsterba@suse.cz>
Sun, 15 Jun 2014 00:28:42 +0000 (02:28 +0200)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Sat, 7 Mar 2015 22:00:26 +0000 (17:00 -0500)
Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit fe864576de7fb940b5bd1f8ab8908a08a3416ca0)

fs/btrfs/extent-tree.c

index bc0aa548b6621d5cc6fa6a2aced872cbff836b18..e7f7e512ccc0bfd7d7e62676f4f0ae94fa224948 100644 (file)
@@ -7217,11 +7217,11 @@ int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
 
 static struct extent_buffer *
 btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root,
-                     u64 bytenr, u32 blocksize, int level)
+                     u64 bytenr, int level)
 {
        struct extent_buffer *buf;
 
-       buf = btrfs_find_create_tree_block(root, bytenr, blocksize);
+       buf = btrfs_find_create_tree_block(root, bytenr, root->nodesize);
        if (!buf)
                return ERR_PTR(-ENOMEM);
        btrfs_set_header_generation(buf, trans->transid);
@@ -7340,7 +7340,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
 
        if (btrfs_test_is_dummy_root(root)) {
                buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr,
-                                           blocksize, level);
+                                           level);
                if (!IS_ERR(buf))
                        root->alloc_bytenr += blocksize;
                return buf;
@@ -7357,8 +7357,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
                return ERR_PTR(ret);
        }
 
-       buf = btrfs_init_new_buffer(trans, root, ins.objectid,
-                                   blocksize, level);
+       buf = btrfs_init_new_buffer(trans, root, ins.objectid, level);
        BUG_ON(IS_ERR(buf)); /* -ENOMEM */
 
        if (root_objectid == BTRFS_TREE_RELOC_OBJECTID) {