btrfs: merge length input and output parameter in compress_pages

The length parameter is basically duplicated for input and output in the
top level caller of the compress_pages chain. We can simply use one
variable for that and reduce stack consumption. The compression
implementation will sink the parameter to a local variable so everything
works as before.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2017-02-14 19:04:07 +01:00
parent 52f75f4fe7
commit 38c3146408
5 changed files with 18 additions and 20 deletions
+2 -3
View File
@@ -23,8 +23,7 @@ void btrfs_init_compress(void);
void btrfs_exit_compress(void);
int btrfs_compress_pages(int type, struct address_space *mapping,
u64 start, unsigned long len,
struct page **pages,
u64 start, struct page **pages,
unsigned long nr_dest_pages,
unsigned long *out_pages,
unsigned long *total_in,
@@ -59,7 +58,7 @@ struct btrfs_compress_op {
int (*compress_pages)(struct list_head *workspace,
struct address_space *mapping,
u64 start, unsigned long len,
u64 start,
struct page **pages,
unsigned long nr_dest_pages,
unsigned long *out_pages,