]> www.infradead.org Git - users/willy/pagecache.git/commit
btrfs: fix two misuses of folio_shift()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 21 Jan 2025 05:40:51 +0000 (05:40 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Feb 2025 19:51:18 +0000 (20:51 +0100)
commit01af106a076352182b2916b143fc50272600bd81
treeb6e1339f97eccfd8007f6aaea72d62a3e15a2e88
parentfdef89ce6fada462aef9cb90a140c93c8c209f0f
btrfs: fix two misuses of folio_shift()

It is meaningless to shift a byte count by folio_shift().  The folio index
is in units of PAGE_SIZE, not folio_size().  We can use folio_contains()
to make this work for arbitrary-order folios, so remove the assertion
that the folios are of order 0.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c