From: Qu Wenruo Date: Thu, 20 Feb 2025 09:22:24 +0000 (+1030) Subject: btrfs: prepare btrfs_launcher_folio() for large folios support X-Git-Tag: v6.15-rc1~152^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=accaec2cbaac98c6225d50c792bc5c36af89bc58;p=thirdparty%2Flinux.git btrfs: prepare btrfs_launcher_folio() for large folios support That function is only calling btrfs_qgroup_free_data(), which doesn't care about the size of the folio. Just replace the fixed PAGE_SIZE with folio_size(). Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 67c2e45707a64..6eedfbfce1cba 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7297,7 +7297,7 @@ static void wait_subpage_spinlock(struct folio *folio) static int btrfs_launder_folio(struct folio *folio) { return btrfs_qgroup_free_data(folio_to_inode(folio), NULL, folio_pos(folio), - PAGE_SIZE, NULL); + folio_size(folio), NULL); } static bool __btrfs_release_folio(struct folio *folio, gfp_t gfp_flags)