Skip to content

Commit 38e5410

Browse files
ryncsnkdave
authored andcommitted
btrfs: open code folio_index() in btree_clear_folio_dirty_tag()
The folio_index() helper is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use folio->index instead. It can't be a swap cache folio here. Swap mapping may only call into fs through 'swap_rw' but btrfs does not use that method for swap. Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Kairui Song <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 8fb1dcb commit 38e5410

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/btrfs/extent_io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,8 +3508,8 @@ static void btree_clear_folio_dirty_tag(struct folio *folio)
35083508
ASSERT(folio_test_locked(folio));
35093509
xa_lock_irq(&folio->mapping->i_pages);
35103510
if (!folio_test_dirty(folio))
3511-
__xa_clear_mark(&folio->mapping->i_pages,
3512-
folio_index(folio), PAGECACHE_TAG_DIRTY);
3511+
__xa_clear_mark(&folio->mapping->i_pages, folio->index,
3512+
PAGECACHE_TAG_DIRTY);
35133513
xa_unlock_irq(&folio->mapping->i_pages);
35143514
}
35153515

0 commit comments

Comments
 (0)