diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2024-06-05 16:15:21 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-07-11 15:33:23 +0200 |
commit | 60f3dabdbc07ec831175b3296b601ea9c46d13a4 (patch) | |
tree | 51bbe90f5acb879fb64b72c79c324bfd11cc2db2 /fs/btrfs | |
parent | btrfs: don't pass fs_info to describe_relocation() (diff) | |
download | linux-60f3dabdbc07ec831175b3296b601ea9c46d13a4.tar.xz linux-60f3dabdbc07ec831175b3296b601ea9c46d13a4.zip |
btrfs: pass a struct reloc_control to prealloc_file_extent_cluster()
Pass a 'struct reloc_control' to prealloc_file_extent_cluster()
instead of passing its members 'data_inode' and 'cluster' on their own.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/relocation.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index df3f7c11cfce..c138d08cce76 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2790,10 +2790,10 @@ out_free_blocks: return ret; } -static noinline_for_stack int prealloc_file_extent_cluster( - struct btrfs_inode *inode, - const struct file_extent_cluster *cluster) +static noinline_for_stack int prealloc_file_extent_cluster(struct reloc_control *rc) { + const struct file_extent_cluster *cluster = &rc->cluster; + struct btrfs_inode *inode = BTRFS_I(rc->data_inode); u64 alloc_hint = 0; u64 start; u64 end; @@ -3104,7 +3104,7 @@ static int relocate_file_extent_cluster(struct reloc_control *rc) if (!ra) return -ENOMEM; - ret = prealloc_file_extent_cluster(BTRFS_I(inode), cluster); + ret = prealloc_file_extent_cluster(rc); if (ret) goto out; |