diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-12-03 17:18:14 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-07 14:18:24 +0100 |
commit | 487e81d2a4009d17dcfe7c67b78b75cd96bcdde3 (patch) | |
tree | 5dd90cbdf77a8de1667fd13e37c0859e20759c2c /fs/btrfs/inode.c | |
parent | 655807b8957ba84a583104c422a8f53725997d55 (diff) | |
download | lwn-487e81d2a4009d17dcfe7c67b78b75cd96bcdde3.tar.gz lwn-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/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1a3f40be4ed8..ea1223c53a10 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5252,6 +5252,7 @@ void btrfs_evict_inode(struct inode *inode) while (1) { struct btrfs_truncate_control control = { + .ino = btrfs_ino(BTRFS_I(inode)), .new_size = 0, .min_type = 0, }; @@ -8533,6 +8534,7 @@ out_noreserve: static int btrfs_truncate(struct inode *inode, bool skip_writeback) { struct btrfs_truncate_control control = { + .ino = btrfs_ino(BTRFS_I(inode)), .min_type = BTRFS_EXTENT_DATA_KEY, .clear_extent_range = true, }; |