summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-12-03 17:18:09 -0500
committerDavid Sterba <dsterba@suse.com>2022-01-07 14:18:24 +0100
commitd9ac19c3806434af2a92b4008dbf39c2a67c60cf (patch)
tree19a889e14a1f4ab9c60901410797639a4392a0af /fs/btrfs/tree-log.c
parent7097a941bf75ed1f632342937984a24f0b1d76a4 (diff)
btrfs: add truncate control struct
I'm going to be adding more arguments and counters to btrfs_truncate_inode_items, so add a control struct to handle all of the extra arguments to make it easier to follow. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 64b42f4b11f2..c732a429a1c6 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4098,11 +4098,15 @@ static int truncate_inode_items(struct btrfs_trans_handle *trans,
struct btrfs_inode *inode,
u64 new_size, u32 min_type)
{
+ struct btrfs_truncate_control control = {
+ .new_size = new_size,
+ .min_type = min_type,
+ };
int ret;
do {
ret = btrfs_truncate_inode_items(trans, log_root, inode,
- new_size, min_type, NULL);
+ &control);
} while (ret == -EAGAIN);
return ret;