summaryrefslogtreecommitdiff
path: root/fs/btrfs/zlib.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-02-14 21:04:07 +0300
committerDavid Sterba <dsterba@suse.com>2017-02-28 16:26:35 +0300
commit38c31464089f639630b7c28ce933a4d60e135a02 (patch)
treefd39ede7261635ac2f47ece7139c668820cf9db0 /fs/btrfs/zlib.c
parent52f75f4fe74ce86376d68b30c94d5fb11cb4019e (diff)
downloadlinux-38c31464089f639630b7c28ce933a4d60e135a02.tar.xz
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/zlib.c')
-rw-r--r--fs/btrfs/zlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index da497f184ff4..42d76b7824c3 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -73,7 +73,7 @@ fail:
static int zlib_compress_pages(struct list_head *ws,
struct address_space *mapping,
- u64 start, unsigned long len,
+ u64 start,
struct page **pages,
unsigned long nr_dest_pages,
unsigned long *out_pages,
@@ -89,6 +89,7 @@ static int zlib_compress_pages(struct list_head *ws,
struct page *in_page = NULL;
struct page *out_page = NULL;
unsigned long bytes_left;
+ unsigned long len = *total_out;
*out_pages = 0;
*total_out = 0;