diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-08-18 16:58:23 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-08-21 18:30:30 +0200 |
commit | b5d9071c4f5c087614eb477bff04795e325bea70 (patch) | |
tree | 49c594ecc27d89ba14aa75511c536f066797589f /fs/btrfs | |
parent | btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent (diff) | |
download | linux-b5d9071c4f5c087614eb477bff04795e325bea70.tar.xz linux-b5d9071c4f5c087614eb477bff04795e325bea70.zip |
btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent
Currently this function is always called with the object id of the root
key of the chunk_tree, which is always BTRFS_CHUNK_TREE_OBJECTID. So
let's subsume it straight into the function itself. No functional
change.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 63608c5f4487..d024f1b07282 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1571,8 +1571,7 @@ out: static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, - u64 chunk_tree, u64 chunk_offset, u64 start, - u64 num_bytes) + u64 chunk_offset, u64 start, u64 num_bytes) { int ret; struct btrfs_path *path; @@ -1599,7 +1598,8 @@ static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, leaf = path->nodes[0]; extent = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dev_extent); - btrfs_set_dev_extent_chunk_tree(leaf, extent, chunk_tree); + btrfs_set_dev_extent_chunk_tree(leaf, extent, + BTRFS_CHUNK_TREE_OBJECTID); btrfs_set_dev_extent_chunk_objectid(leaf, extent, BTRFS_FIRST_CHUNK_TREE_OBJECTID); btrfs_set_dev_extent_chunk_offset(leaf, extent, chunk_offset); @@ -4903,10 +4903,8 @@ int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans, ret = btrfs_update_device(trans, device); if (ret) break; - ret = btrfs_alloc_dev_extent(trans, device, - chunk_root->root_key.objectid, - chunk_offset, dev_offset, - stripe_size); + ret = btrfs_alloc_dev_extent(trans, device, chunk_offset, + dev_offset, stripe_size); if (ret) break; } |