diff options
author | David Sterba <dsterba@suse.cz> | 2014-06-14 20:28:42 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-12 12:07:20 -0500 |
commit | fe864576de7fb940b5bd1f8ab8908a08a3416ca0 (patch) | |
tree | e4cc0d3d497a353cee58fa64cff10ac9d4b06456 /fs | |
parent | c0dcaa4d7b66b788b315c418bda3cca75c5938dc (diff) |
btrfs: sink blocksize parameter to btrfs_init_new_buffer
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c025751c20d7..50ebc74db508 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -7215,11 +7215,11 @@ int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans, | |||
7215 | 7215 | ||
7216 | static struct extent_buffer * | 7216 | static struct extent_buffer * |
7217 | btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root, | 7217 | btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root, |
7218 | u64 bytenr, u32 blocksize, int level) | 7218 | u64 bytenr, int level) |
7219 | { | 7219 | { |
7220 | struct extent_buffer *buf; | 7220 | struct extent_buffer *buf; |
7221 | 7221 | ||
7222 | buf = btrfs_find_create_tree_block(root, bytenr, blocksize); | 7222 | buf = btrfs_find_create_tree_block(root, bytenr, root->nodesize); |
7223 | if (!buf) | 7223 | if (!buf) |
7224 | return ERR_PTR(-ENOMEM); | 7224 | return ERR_PTR(-ENOMEM); |
7225 | btrfs_set_header_generation(buf, trans->transid); | 7225 | btrfs_set_header_generation(buf, trans->transid); |
@@ -7338,7 +7338,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, | |||
7338 | 7338 | ||
7339 | if (btrfs_test_is_dummy_root(root)) { | 7339 | if (btrfs_test_is_dummy_root(root)) { |
7340 | buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr, | 7340 | buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr, |
7341 | blocksize, level); | 7341 | level); |
7342 | if (!IS_ERR(buf)) | 7342 | if (!IS_ERR(buf)) |
7343 | root->alloc_bytenr += blocksize; | 7343 | root->alloc_bytenr += blocksize; |
7344 | return buf; | 7344 | return buf; |
@@ -7355,8 +7355,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, | |||
7355 | return ERR_PTR(ret); | 7355 | return ERR_PTR(ret); |
7356 | } | 7356 | } |
7357 | 7357 | ||
7358 | buf = btrfs_init_new_buffer(trans, root, ins.objectid, | 7358 | buf = btrfs_init_new_buffer(trans, root, ins.objectid, level); |
7359 | blocksize, level); | ||
7360 | BUG_ON(IS_ERR(buf)); /* -ENOMEM */ | 7359 | BUG_ON(IS_ERR(buf)); /* -ENOMEM */ |
7361 | 7360 | ||
7362 | if (root_objectid == BTRFS_TREE_RELOC_OBJECTID) { | 7361 | if (root_objectid == BTRFS_TREE_RELOC_OBJECTID) { |