mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
btrfs: derive maximum output size in the compression implementation
The value of max_out can be calculated from the parameters passed to the compressors, which is number of pages and the page size, and we don't have to needlessly pass it around. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
069eac7850
commit
e5d7490236
5 changed files with 9 additions and 14 deletions
|
@ -932,8 +932,7 @@ int btrfs_compress_pages(int type, struct address_space *mapping,
|
|||
u64 start, struct page **pages,
|
||||
unsigned long *out_pages,
|
||||
unsigned long *total_in,
|
||||
unsigned long *total_out,
|
||||
unsigned long max_out)
|
||||
unsigned long *total_out)
|
||||
{
|
||||
struct list_head *workspace;
|
||||
int ret;
|
||||
|
@ -943,8 +942,7 @@ int btrfs_compress_pages(int type, struct address_space *mapping,
|
|||
ret = btrfs_compress_op[type-1]->compress_pages(workspace, mapping,
|
||||
start, pages,
|
||||
out_pages,
|
||||
total_in, total_out,
|
||||
max_out);
|
||||
total_in, total_out);
|
||||
free_workspace(type, workspace);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue