]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: return -1 when lzo compression makes data bigger
authorStefan Agner <stefan@agner.ch>
Mon, 1 Jul 2013 18:33:39 +0000 (20:33 +0200)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 11:57:19 +0000 (07:57 -0400)
commit51f8c7d861c089afe27d8dabd7248207d670a230
tree88140a72bddf7db4cd6a44bbf29a4dddbbba99b9
parent9b4ec536e197229c4b688607dc010062496cbed4
Btrfs: return -1 when lzo compression makes data bigger

With this fix the lzo code behaves like the zlib code by returning an
error
code when compression does not help reduce the size of the file.
This is currently not a bug since the compressed size is checked again
in
the calling method compress_file_range.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/lzo.c