]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: make alloc_extent_buffer() check subpage dirty bitmap
authorQu Wenruo <wqu@suse.com>
Thu, 25 Mar 2021 07:14:41 +0000 (15:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:58 +0000 (15:35 +0200)
commite752c1f9d9e8bce91c1e026e151948569f155c7e
tree2586241094f566ce9e1ae53ca19a5155e2712f96
parenta0ee728e9ee82bd78f299aa02b59df06a4b840a2
btrfs: make alloc_extent_buffer() check subpage dirty bitmap

In alloc_extent_buffer(), we make sure that the newly allocated page is
never dirty.

This is fine for sector size == PAGE_SIZE case, but for subpage it's
possible that one extent buffer in the page is dirty, thus the whole
page is marked dirty, and could cause false alert.

To support subpage, call btrfs_page_test_dirty() to handle both cases.

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