diff options
| author | Kairui Song <[email protected]> | 2025-04-30 18:10:48 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-05-02 11:20:56 +0000 |
| commit | 38e541051e1d19e8b1479a6af587a7884653e041 (patch) | |
| tree | 0a3922be8a9ee0fe43e97bf3f473e0bf0d21104e /fs/btrfs/extent_io.c | |
| parent | Revert "btrfs: canonicalize the device path before adding it" (diff) | |
| download | kernel-38e541051e1d19e8b1479a6af587a7884653e041.tar.gz kernel-38e541051e1d19e8b1479a6af587a7884653e041.zip | |
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]>
Diffstat (limited to 'fs/btrfs/extent_io.c')
| -rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 8515c31f563b..13bdd60da3c7 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3508,8 +3508,8 @@ static void btree_clear_folio_dirty_tag(struct folio *folio) ASSERT(folio_test_locked(folio)); xa_lock_irq(&folio->mapping->i_pages); if (!folio_test_dirty(folio)) - __xa_clear_mark(&folio->mapping->i_pages, - folio_index(folio), PAGECACHE_TAG_DIRTY); + __xa_clear_mark(&folio->mapping->i_pages, folio->index, + PAGECACHE_TAG_DIRTY); xa_unlock_irq(&folio->mapping->i_pages); } |
