Skip to content

Commit

Permalink
btrfs: use E2BIG instead of EIO if compression does not help
Browse files Browse the repository at this point in the history
Return codes got updated in 60e1975
(btrfs: return errno instead of -1 from compression)
lzo wrapper returns E2BIG in this case, do the same for zlib.

Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave authored and masoncl committed Jul 3, 2014
1 parent 0a4eaea commit 130d5b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int zlib_compress_pages(struct list_head *ws,
if (workspace->def_strm.total_in > 8192 &&
workspace->def_strm.total_in <
workspace->def_strm.total_out) {
ret = -EIO;
ret = -E2BIG;
goto out;
}
/* we need another page for writing out. Test this
Expand Down

0 comments on commit 130d5b4

Please sign in to comment.