summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-11-08 18:09:03 +0100
committerDavid Sterba <dsterba@suse.com>2016-11-30 13:45:17 +0100
commitb159fa2808b1b53d784807a48ad95fa809be10b0 (patch)
treefc5c081987f9a01dae93a05162d736d91af86dff /fs/btrfs/ctree.c
parentfba1acf9ff77656e3b9f5c0f7b6a52c93e4932ec (diff)
downloadlinux-b159fa2808b1b53d784807a48ad95fa809be10b0.tar.bz2
btrfs: remove constant parameter to memset_extent_buffer and rename it
The only memset we do is to 0, so sink the parameter to the function and simplify all calls. Rename the function to reflect the behaviour. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 93bc38b98b3f..be362b776138 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -3348,7 +3348,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,
root_add_used(root, root->nodesize);
- memset_extent_buffer(c, 0, 0, sizeof(struct btrfs_header));
+ memzero_extent_buffer(c, 0, sizeof(struct btrfs_header));
btrfs_set_header_nritems(c, 1);
btrfs_set_header_level(c, level);
btrfs_set_header_bytenr(c, c->start);
@@ -3484,7 +3484,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
root_add_used(root, root->nodesize);
- memset_extent_buffer(split, 0, 0, sizeof(struct btrfs_header));
+ memzero_extent_buffer(split, 0, sizeof(struct btrfs_header));
btrfs_set_header_level(split, btrfs_header_level(c));
btrfs_set_header_bytenr(split, split->start);
btrfs_set_header_generation(split, trans->transid);
@@ -4270,7 +4270,7 @@ again:
root_add_used(root, root->nodesize);
- memset_extent_buffer(right, 0, 0, sizeof(struct btrfs_header));
+ memzero_extent_buffer(right, 0, sizeof(struct btrfs_header));
btrfs_set_header_bytenr(right, right->start);
btrfs_set_header_generation(right, trans->transid);
btrfs_set_header_backref_rev(right, BTRFS_MIXED_BACKREF_REV);