btrfs-progs: drop unused argument from btrfs_truncate_item

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-02-02 13:38:44 +01:00
parent 2c23b7b871
commit 4069aa73d3
6 changed files with 8 additions and 12 deletions

View File

@ -2295,9 +2295,7 @@ split:
return ret;
}
int btrfs_truncate_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path,
int btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
u32 new_size, int from_end)
{
int ret = 0;

View File

@ -2600,9 +2600,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
struct extent_buffer **cow_ret, u64 new_root_objectid);
int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_path *path, u32 data_size);
int btrfs_truncate_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path,
int btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
u32 new_size, int from_end);
int btrfs_split_item(struct btrfs_trans_handle *trans,
struct btrfs_root *root,

View File

@ -272,7 +272,7 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
start = btrfs_item_ptr_offset(leaf, path->slots[0]);
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
item_len - (ptr + sub_item_len - start));
btrfs_truncate_item(trans, root, path, item_len - sub_item_len, 1);
btrfs_truncate_item(root, path, item_len - sub_item_len, 1);
}
return ret;
}

View File

@ -1308,7 +1308,7 @@ static int update_inline_extent_backref(struct btrfs_trans_handle *trans,
memmove_extent_buffer(leaf, ptr, ptr + size,
end - ptr - size);
item_size -= size;
ret = btrfs_truncate_item(trans, root, path, item_size, 1);
ret = btrfs_truncate_item(root, path, item_size, 1);
BUG_ON(ret);
}
btrfs_mark_buffer_dirty(leaf);

View File

@ -364,7 +364,7 @@ static noinline int truncate_one_csum(struct btrfs_trans_handle *trans,
*/
u32 new_size = (bytenr - key->offset) / blocksize;
new_size *= csum_size;
ret = btrfs_truncate_item(trans, root, path, new_size, 1);
ret = btrfs_truncate_item(root, path, new_size, 1);
BUG_ON(ret);
} else if (key->offset >= bytenr && csum_end > end_byte &&
end_byte > key->offset) {
@ -377,7 +377,7 @@ static noinline int truncate_one_csum(struct btrfs_trans_handle *trans,
u32 new_size = (csum_end - end_byte) / blocksize;
new_size *= csum_size;
ret = btrfs_truncate_item(trans, root, path, new_size, 0);
ret = btrfs_truncate_item(root, path, new_size, 0);
BUG_ON(ret);
key->offset = end_byte;

View File

@ -312,7 +312,7 @@ int btrfs_del_inode_extref(struct btrfs_trans_handle *trans,
memmove_extent_buffer(leaf, ptr, ptr + del_len,
item_size - (ptr + del_len - item_start));
btrfs_truncate_item(trans, root, path, item_size - del_len, 1);
btrfs_truncate_item(root, path, item_size - del_len, 1);
out:
btrfs_free_path(path);
@ -433,7 +433,7 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
item_start = btrfs_item_ptr_offset(leaf, path->slots[0]);
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
item_size - (ptr + sub_item_len - item_start));
btrfs_truncate_item(trans, root, path, item_size - sub_item_len, 1);
btrfs_truncate_item(root, path, item_size - sub_item_len, 1);
btrfs_mark_buffer_dirty(path->nodes[0]);
out:
btrfs_free_path(path);