summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-02-09 11:12:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-02-09 11:12:26 -0800
commit9c1db7798141e2658e4b5bb170128dfdc3270ff4 (patch)
tree1b582ab69b70f0a91f6ec2a5b4d3c0b963822cc1 /fs/btrfs/compression.c
parent6f2a1c1e78771a78c1696f5a67e8320e76a8dc0b (diff)
parenta2aa75e18a21b21952dc6daa9bac7c9f4426f81f (diff)
downloadop-kernel-dev-9c1db7798141e2658e4b5bb170128dfdc3270ff4.zip
op-kernel-dev-9c1db7798141e2658e4b5bb170128dfdc3270ff4.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason: "This is a small collection of fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix data corruption when reading/updating compressed extents Btrfs: don't loop forever if we can't run because of the tree mod log btrfs: reserve no transaction units in btrfs_ioctl_set_features btrfs: commit transaction after setting label and features Btrfs: fix assert screwup for the pending move stuff
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index e2600cd..b01fb6c 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1010,6 +1010,8 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
bytes = min(bytes, working_bytes);
kaddr = kmap_atomic(page_out);
memcpy(kaddr + *pg_offset, buf + buf_offset, bytes);
+ if (*pg_index == (vcnt - 1) && *pg_offset == 0)
+ memset(kaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
kunmap_atomic(kaddr);
flush_dcache_page(page_out);
OpenPOWER on IntegriCloud