]> www.infradead.org Git - users/hch/block.git/commitdiff
btrfs: Remove a use of PAGE_SIZE in btrfs_invalidate_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 30 Mar 2022 14:49:30 +0000 (15:49 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 31 Mar 2022 11:58:52 +0000 (13:58 +0200)
While btrfs doesn't use large folios yet, this should have been changed
as part of the conversion from invalidatepage to invalidate_folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/btrfs/inode.c

index aa0a60ee26cb742b31e1ca0985a4d8964befb7cd..6bfc4343c98d123a6da6aaa9c06e2ee1d806fbf6 100644 (file)
@@ -8296,7 +8296,7 @@ static void btrfs_invalidate_folio(struct folio *folio, size_t offset,
         * cover the full folio, like invalidating the last folio, we're
         * still safe to wait for ordered extent to finish.
         */
-       if (!(offset == 0 && length == PAGE_SIZE)) {
+       if (!(offset == 0 && length == folio_size(folio))) {
                btrfs_releasepage(&folio->page, GFP_NOFS);
                return;
        }