diff options
author | David Sterba <dsterba@suse.com> | 2017-02-14 19:04:07 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 14:26:35 +0100 |
commit | 38c31464089f639630b7c28ce933a4d60e135a02 (patch) | |
tree | fd39ede7261635ac2f47ece7139c668820cf9db0 /fs/btrfs/compression.h | |
parent | 52f75f4fe74ce86376d68b30c94d5fb11cb4019e (diff) | |
download | lwn-38c31464089f639630b7c28ce933a4d60e135a02.tar.gz lwn-38c31464089f639630b7c28ce933a4d60e135a02.zip |
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>
Diffstat (limited to 'fs/btrfs/compression.h')
-rw-r--r-- | fs/btrfs/compression.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h index 1c700bb20b52..725d1e0bd25d 100644 --- a/fs/btrfs/compression.h +++ b/fs/btrfs/compression.h @@ -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, |