mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-01 22:48:06 +00:00
btrfs-progs: drop unused argument from btrfs_truncate_item
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2c23b7b871
commit
4069aa73d3
4
ctree.c
4
ctree.c
@ -2295,9 +2295,7 @@ split:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_truncate_item(struct btrfs_trans_handle *trans,
|
int btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_path *path,
|
|
||||||
u32 new_size, int from_end)
|
u32 new_size, int from_end)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
4
ctree.h
4
ctree.h
@ -2600,9 +2600,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
|
|||||||
struct extent_buffer **cow_ret, u64 new_root_objectid);
|
struct extent_buffer **cow_ret, u64 new_root_objectid);
|
||||||
int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root
|
int btrfs_extend_item(struct btrfs_trans_handle *trans, struct btrfs_root
|
||||||
*root, struct btrfs_path *path, u32 data_size);
|
*root, struct btrfs_path *path, u32 data_size);
|
||||||
int btrfs_truncate_item(struct btrfs_trans_handle *trans,
|
int btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_path *path,
|
|
||||||
u32 new_size, int from_end);
|
u32 new_size, int from_end);
|
||||||
int btrfs_split_item(struct btrfs_trans_handle *trans,
|
int btrfs_split_item(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
struct btrfs_root *root,
|
||||||
|
@ -272,7 +272,7 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
|
|||||||
start = btrfs_item_ptr_offset(leaf, path->slots[0]);
|
start = btrfs_item_ptr_offset(leaf, path->slots[0]);
|
||||||
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
|
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
|
||||||
item_len - (ptr + sub_item_len - start));
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1308,7 +1308,7 @@ static int update_inline_extent_backref(struct btrfs_trans_handle *trans,
|
|||||||
memmove_extent_buffer(leaf, ptr, ptr + size,
|
memmove_extent_buffer(leaf, ptr, ptr + size,
|
||||||
end - ptr - size);
|
end - ptr - size);
|
||||||
item_size -= 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);
|
BUG_ON(ret);
|
||||||
}
|
}
|
||||||
btrfs_mark_buffer_dirty(leaf);
|
btrfs_mark_buffer_dirty(leaf);
|
||||||
|
@ -364,7 +364,7 @@ static noinline int truncate_one_csum(struct btrfs_trans_handle *trans,
|
|||||||
*/
|
*/
|
||||||
u32 new_size = (bytenr - key->offset) / blocksize;
|
u32 new_size = (bytenr - key->offset) / blocksize;
|
||||||
new_size *= csum_size;
|
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);
|
BUG_ON(ret);
|
||||||
} else if (key->offset >= bytenr && csum_end > end_byte &&
|
} else if (key->offset >= bytenr && csum_end > end_byte &&
|
||||||
end_byte > key->offset) {
|
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;
|
u32 new_size = (csum_end - end_byte) / blocksize;
|
||||||
new_size *= csum_size;
|
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);
|
BUG_ON(ret);
|
||||||
|
|
||||||
key->offset = end_byte;
|
key->offset = end_byte;
|
||||||
|
@ -312,7 +312,7 @@ int btrfs_del_inode_extref(struct btrfs_trans_handle *trans,
|
|||||||
memmove_extent_buffer(leaf, ptr, ptr + del_len,
|
memmove_extent_buffer(leaf, ptr, ptr + del_len,
|
||||||
item_size - (ptr + del_len - item_start));
|
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:
|
out:
|
||||||
btrfs_free_path(path);
|
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]);
|
item_start = btrfs_item_ptr_offset(leaf, path->slots[0]);
|
||||||
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
|
memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
|
||||||
item_size - (ptr + sub_item_len - item_start));
|
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]);
|
btrfs_mark_buffer_dirty(path->nodes[0]);
|
||||||
out:
|
out:
|
||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user