diff options
| author | Jens Axboe <axboe@fb.com> | 2017-04-07 21:45:20 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2017-04-07 21:45:20 +0300 |
| commit | 65f619d2535197d97067eeeef75a40f25b552e69 (patch) | |
| tree | 13f96c51a2b591ed22f1771541998bb77178f685 /fs/btrfs/inode.c | |
| parent | fbbaf700e7b163a0f1704b2d542ee28be11fce21 (diff) | |
| parent | 6d8c6c0f97ad8a3517c42b179c1dc8e77397d0e2 (diff) | |
| download | linux-65f619d2535197d97067eeeef75a40f25b552e69.tar.xz | |
Merge branch 'for-linus' into for-4.12/block
We've added a considerable amount of fixes for stalls and issues
with the blk-mq scheduling in the 4.11 series since forking
off the for-4.12/block branch. We need to do improvements on
top of that for 4.12, so pull in the previous fixes to make
our lives easier going forward.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c40060cc481f..231503935652 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6709,6 +6709,20 @@ static noinline int uncompress_inline(struct btrfs_path *path, max_size = min_t(unsigned long, PAGE_SIZE, max_size); ret = btrfs_decompress(compress_type, tmp, page, extent_offset, inline_size, max_size); + + /* + * decompression code contains a memset to fill in any space between the end + * of the uncompressed data and the end of max_size in case the decompressed + * data ends up shorter than ram_bytes. That doesn't cover the hole between + * the end of an inline extent and the beginning of the next block, so we + * cover that region here. + */ + + if (max_size + pg_offset < PAGE_SIZE) { + char *map = kmap(page); + memset(map + pg_offset + max_size, 0, PAGE_SIZE - max_size - pg_offset); + kunmap(page); + } kfree(tmp); return ret; } |
