diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-06-08 15:47:52 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 15:02:04 +0200 |
commit | f23d10d9c052fcc1c1485392edfe19ebf14c634f (patch) | |
tree | 9f8b802d99e61a4bd2c6dbb7ca4de62171ef252e /ctree.c | |
parent | 2c6e4834c326f180fb413fe402d09556e03b7789 (diff) |
btrfs-progs: Always pass 0 for offset when calling btrfs_free_extent for btree blocks.
Currently some instances of btrfs_free_extent are called with the
last parameter ("offset") being set to 1. This makes no sense, since
offset is used for data extents. I suspect this is a left-over from
95d3f20b51e9 ("Mixed back reference (FORWARD ROLLING FORMAT CHANGE)")
since this commit changed the signature of the function from :
-int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
- *root, u64 bytenr, u64 num_bytes, u64 parent,
- u64 root_objectid, u64 ref_generation,
- u64 owner_objectid, int pin);
to
+int btrfs_free_extent(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root,
+ u64 bytenr, u64 num_bytes, u64 parent,
+ u64 root_objectid, u64 owner, u64 offset);
I.e the last parameter was "pin" and not offset. So these are just
leftovers with no semantic meaning. Fix this by passing 0.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.c')
-rw-r--r-- | ctree.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -334,7 +334,7 @@ int __btrfs_cow_block(struct btrfs_trans_handle *trans, WARN_ON(btrfs_header_generation(parent) != trans->transid); btrfs_free_extent(trans, root, buf->start, buf->len, - 0, root->root_key.objectid, level, 1); + 0, root->root_key.objectid, level, 0); } if (!list_empty(&buf->recow)) { list_del_init(&buf->recow); @@ -738,7 +738,7 @@ static int balance_level(struct btrfs_trans_handle *trans, ret = btrfs_free_extent(trans, root, mid->start, mid->len, 0, root->root_key.objectid, - level, 1); + level, 0); /* once for the root ptr */ free_extent_buffer(mid); return ret; |