]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: subpage: make btrfs_submit_compressed_write() compatible
authorQu Wenruo <wqu@suse.com>
Mon, 27 Sep 2021 07:22:00 +0000 (15:22 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:04 +0000 (19:08 +0200)
commit10490d0c84dc9516d5b5f4dcc077c84c51895133
treef4826766c519b22683fb9222f949d127d9113a80
parent63935fccc0845c6b86df2ee1c1bf2527fb0bde9e
btrfs: subpage: make btrfs_submit_compressed_write() compatible

There is a WARN_ON() checking if @start is aligned to PAGE_SIZE, not
sectorsize, which will cause false alert for subpage.  Fix it to check
against sectorsize.

Furthermore:

- Use ASSERT() to do the check
  So that in the future we may skip the check for production build

- Also check alignment for @len

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