btrfs: use a separate label for the incompressible case in compress_file_range
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jun 2023 15:31:38 +0000 (17:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:15 +0000 (14:52 +0200)
commit184aa1ffa5fdf77853488c7d7fddb113cf2e33fe
tree1174f8cf3e9e1822d02aed35980c4a094959b363
parent6a7167bf9c9258a214bb0526bd3ecbc96db893ef
btrfs: use a separate label for the incompressible case in compress_file_range

compress_file_range can fail to compress either because of resource or
alignment constraints or because the data is incompressible.  In the latter
case the inode is marked so that compression isn't tried again.  Currently
that check is based on the condition that the pages array has been allocated
which is rather cryptic.  Use a separate label to clearly distinguish this
case.

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