From 71d18b53540f106a394cb35ed93b487b76678b06 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 3 Dec 2021 17:18:15 -0500 Subject: btrfs: add inode to truncate control In the future we're going to want to use btrfs_truncate_inode_items without looking up the associated inode. In order to accommodate this add the inode to btrfs_truncate_control and handle the case where control->inode is NULL appropriately. This is fairly straightforward, we simply need to add a helper for the trace points, as the file extent map update is controlled by a flag on btrfs_truncate_control. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/tree-log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/btrfs/tree-log.c') diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8c099cd40956..2c87626561aa 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4107,8 +4107,7 @@ static int truncate_inode_items(struct btrfs_trans_handle *trans, int ret; do { - ret = btrfs_truncate_inode_items(trans, log_root, inode, - &control); + ret = btrfs_truncate_inode_items(trans, log_root, &control); } while (ret == -EAGAIN); return ret; -- cgit v1.2.3