btrfs: streamline compress_file_range
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jun 2023 15:31:36 +0000 (17:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:15 +0000 (14:52 +0200)
commite94e54e89b4f9cbbdc2dbbf0c44adae0f4722ab6
tree41d58d32080140bdb19783c2c789301797a0042b
parent00d31d17663c55de99c1fc1224d06009c4799fc1
btrfs: streamline compress_file_range

Reorder compress_file_range so that the main compression flow happens
straight line and not in branches.  To do this ensure that pages is
always zeroed before a page allocation happens, which allows the
cleanup_and_bail_uncompressed label to clean up the page allocations
as needed.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c