aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorGravatar Josef Bacik <josef@toxicpanda.com> 2021-12-03 17:18:14 -0500
committerGravatar David Sterba <dsterba@suse.com> 2022-01-07 14:18:24 +0100
commit487e81d2a4009d17dcfe7c67b78b75cd96bcdde3 (patch)
tree5dd90cbdf77a8de1667fd13e37c0859e20759c2c /fs/btrfs/tree-log.c
parentbtrfs: use a flag to control when to clear the file extent range (diff)
downloadlinux-487e81d2a4009d17dcfe7c67b78b75cd96bcdde3.tar.gz
linux-487e81d2a4009d17dcfe7c67b78b75cd96bcdde3.tar.bz2
linux-487e81d2a4009d17dcfe7c67b78b75cd96bcdde3.zip
btrfs: pass the ino via truncate control
In the future we are going to want to truncate inode items without needing to have an btrfs_inode to pass in, so add ino to the btrfs_truncate_control and use that to look up the inode items to truncate. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 2b5e24c24a6b..8c099cd40956 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4100,6 +4100,7 @@ static int truncate_inode_items(struct btrfs_trans_handle *trans,
{
struct btrfs_truncate_control control = {
.new_size = new_size,
+ .ino = btrfs_ino(inode),
.min_type = min_type,
.skip_ref_updates = true,
};