diff options
author | Qu Wenruo <wqu@suse.com> | 2021-04-17 20:52:13 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-27 08:05:30 -0400 |
commit | dae9aeda45277de24161d0f68f1a9468758f166e (patch) | |
tree | 71d503513ce5122132f78093da1cd57d6a86697c /board/technexion | |
parent | c2343695e309f2176817dfa836dd42fc6cecc7a3 (diff) | |
download | u-boot-dae9aeda45277de24161d0f68f1a9468758f166e.tar.gz |
fs: btrfs: fix the false alert of decompression failure
There are some cases where decompressed sectors can have padding zeros.
In kernel code, we have lines to address such situation:
/*
* btrfs_getblock is doing a zero on the tail of the page too,
* but this will cover anything missing from the decompressed
* data.
*/
if (bytes < destlen)
memset(kaddr+bytes, 0, destlen-bytes);
kunmap_local(kaddr);
But not in U-boot code, thus we have some reports of U-boot failed to
read compressed files in btrfs.
Fix it by doing the same thing of the kernel, for both inline and
regular compressed extents.
Reported-by: Matwey Kornilov <matwey.kornilov@gmail.com>
Link: https://bugzilla.suse.com/show_bug.cgi?id=1183717
Fixes: a26a6bedafcf ("fs: btrfs: Introduce btrfs_read_extent_inline() and btrfs_read_extent_reg()")
Signed-off-by: Qu Wenruo <wqu@suse.com>
Diffstat (limited to 'board/technexion')
0 files changed, 0 insertions, 0 deletions