Skip to content

Commit bc2b85a

Browse files
committed
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>
1 parent 4e30444 commit bc2b85a

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

fs/btrfs/extent_io.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ static void end_bbio_data_write(struct btrfs_bio *bbio)
530530
u32 len = fi.length;
531531

532532
bio_size += len;
533-
ASSERT(btrfs_folio_test_ordered(fs_info, folio, start, len));
534533
btrfs_folio_clear_ordered(fs_info, folio, start, len);
535534
btrfs_folio_clear_writeback(fs_info, folio, start, len);
536535
}

fs/btrfs/inode.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7499,12 +7499,6 @@ static int btrfs_migrate_folio(struct address_space *mapping,
74997499

75007500
if (ret)
75017501
return ret;
7502-
7503-
if (folio_test_ordered(src)) {
7504-
folio_clear_ordered(src);
7505-
folio_set_ordered(dst);
7506-
}
7507-
75087502
return 0;
75097503
}
75107504
#else
@@ -7672,12 +7666,6 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset,
76727666
}
76737667
btrfs_folio_clear_dirty(fs_info, folio, page_start, folio_size(folio));
76747668
btrfs_clear_folio_dirty_tag(folio);
7675-
/*
7676-
* We have iterated through all ordered extents of the page, the page
7677-
* should not have Ordered anymore, or the above iteration
7678-
* did something wrong.
7679-
*/
7680-
ASSERT(!folio_test_ordered(folio));
76817669
if (!inode_evicting)
76827670
__btrfs_release_folio(folio, GFP_NOFS);
76837671
clear_folio_extent_mapped(folio);

0 commit comments

Comments
 (0)