From: Matthew Wilcox (Oracle) Date: Wed, 30 Mar 2022 03:25:06 +0000 (-0400) Subject: btrfs: Remove a use of PAGE_SIZE in btrfs_invalidate_folio() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5a60542c61f3cce6e5dff2a38c8fb08a852a517b;p=linux.git btrfs: Remove a use of PAGE_SIZE in btrfs_invalidate_folio() 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) Reviewed-by: Christoph Hellwig Reviewed-by: Al Viro Acked-by: Al Viro --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index aa0a60ee26cb7..6bfc4343c98d1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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; }