]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: subpage: make compress_file_range() compatible
authorQu Wenruo <wqu@suse.com>
Mon, 27 Sep 2021 07:21:59 +0000 (15:21 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:04 +0000 (19:08 +0200)
commitb9629c2e1e6910443c8b681a770edc10c33da6e2
tree2edb2d1741531a2a6b7d106ce7f7cc7d912c9ee2
parentba219246184c59db9e71cbc28ba3818d6fc68892
btrfs: subpage: make compress_file_range() compatible

In function compress_file_range(), when the compression is finished, the
function just rounds up @total_in to PAGE_SIZE.  This is fine for
regular sectorsize == PAGE_SIZE case, but not for subpage.

Just change the ALIGN(, PAGE_SIZE) to round_up(, sectorsize) so that
both regular sectorsize and subpage sectorsize will be happy.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c