diff mbox series

[2/2] squashfs: Fix "convert squashfs_fill_page() to take a folio"

Message ID 20250110163300.3346321-2-willy@infradead.org (mailing list archive)
State New
Headers show
Series [1/2] mm: Fix assertion in folio_end_read() | expand

Commit Message

Matthew Wilcox Jan. 10, 2025, 4:32 p.m. UTC
I got the polarity of "uptodate" wrong.  Rename it.  Thanks to
Ryan for testing; please fold into above named patch, and he'd like
you to add

Tested-by: Ryan Roberts <ryan.roberts@arm.com>

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/squashfs/file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/squashfs/file.c b/fs/squashfs/file.c
index da25d6fa45ce..018f0053a4f5 100644
--- a/fs/squashfs/file.c
+++ b/fs/squashfs/file.c
@@ -400,7 +400,7 @@  void squashfs_copy_cache(struct folio *folio,
 			bytes -= PAGE_SIZE, offset += PAGE_SIZE) {
 		struct folio *push_folio;
 		size_t avail = buffer ? min(bytes, PAGE_SIZE) : 0;
-		bool uptodate = true;
+		bool updated = false;
 
 		TRACE("bytes %zu, i %d, available_bytes %zu\n", bytes, i, avail);
 
@@ -415,9 +415,9 @@  void squashfs_copy_cache(struct folio *folio,
 		if (folio_test_uptodate(push_folio))
 			goto skip_folio;
 
-		uptodate = squashfs_fill_page(push_folio, buffer, offset, avail);
+		updated = squashfs_fill_page(push_folio, buffer, offset, avail);
 skip_folio:
-		folio_end_read(push_folio, uptodate);
+		folio_end_read(push_folio, updated);
 		if (i != folio->index)
 			folio_put(push_folio);
 	}