Commit a6d90385 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: (invalidate|release)_folio fixes

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3a0e06db
......@@ -736,9 +736,6 @@ vm_fault_t bch2_page_mkwrite(struct vm_fault *vmf)
void bch2_invalidate_folio(struct folio *folio, size_t offset, size_t length)
{
EBUG_ON(!PageLocked(&folio->page));
EBUG_ON(folio_test_writeback(folio));
if (offset || length < folio_size(folio))
return;
......@@ -751,7 +748,7 @@ bool bch2_release_folio(struct folio *folio, gfp_t gfp_mask)
EBUG_ON(!PageLocked(&folio->page));
EBUG_ON(folio_test_writeback(folio));
if (folio_test_dirty(folio))
if (folio_test_dirty(folio) || folio_test_writeback(folio))
return false;
bch2_clear_page_bits(&folio->page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment