mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
btrfs: remove folio_test_ordered() usage
This involves: - The ASSERT() inside end_bbio_data_write() It's only an ASSERT() and it has never been triggered as far as I know. - btrfs_migrate_folio() Since all folio_test_ordered() usage will be removed, there is no need to copy the folio ordered flag. - The ASSERT() inside btrfs_invalidate_folio() This one has its usefulness as it indeed caught some bugs during development. But that's the last user and will not be worth the folio flag or the subpage bitmap. This will allow btrfs to finally remove the ordered flags. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
7d97bdca4b
commit
aea704836e
|
|
@ -530,7 +530,6 @@ static void end_bbio_data_write(struct btrfs_bio *bbio)
|
|||
u32 len = fi.length;
|
||||
|
||||
bio_size += len;
|
||||
ASSERT(btrfs_folio_test_ordered(fs_info, folio, start, len));
|
||||
btrfs_folio_clear_ordered(fs_info, folio, start, len);
|
||||
btrfs_folio_clear_writeback(fs_info, folio, start, len);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7499,12 +7499,6 @@ static int btrfs_migrate_folio(struct address_space *mapping,
|
|||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (folio_test_ordered(src)) {
|
||||
folio_clear_ordered(src);
|
||||
folio_set_ordered(dst);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
|
@ -7672,12 +7666,6 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset,
|
|||
}
|
||||
btrfs_folio_clear_dirty(fs_info, folio, page_start, folio_size(folio));
|
||||
btrfs_clear_folio_dirty_tag(folio);
|
||||
/*
|
||||
* We have iterated through all ordered extents of the page, the page
|
||||
* should not have Ordered anymore, or the above iteration
|
||||
* did something wrong.
|
||||
*/
|
||||
ASSERT(!folio_test_ordered(folio));
|
||||
if (!inode_evicting)
|
||||
__btrfs_release_folio(folio, GFP_NOFS);
|
||||
clear_folio_extent_mapped(folio);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user