]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - fs/btrfs/compression.c
Merge tag 'csky-for-linus-5.6-rc3' of git://github.com/c-sky/csky-linux
[mirror_ubuntu-jammy-kernel.git] / fs / btrfs / compression.c
index de95ad27722f70f13a2f1fbd5063902aad632187..9ab610cc91142092765fb8a1eca310e30d35ab7c 100644 (file)
@@ -1290,7 +1290,7 @@ int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
        /* copy bytes from the working buffer into the pages */
        while (working_bytes > 0) {
                bytes = min_t(unsigned long, bvec.bv_len,
-                               PAGE_SIZE - buf_offset);
+                               PAGE_SIZE - (buf_offset % PAGE_SIZE));
                bytes = min(bytes, working_bytes);
 
                kaddr = kmap_atomic(bvec.bv_page);