Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

squashfs: pass a folio to squashfs_readpage_fragment()

Remove an access to page->mapping.

Link: https://lkml.kernel.org/r/20241220224634.723899-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Phillip Lougher <phillip@squashfs.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
8c1565fc 608c2501

+4 -4
+4 -4
fs/squashfs/file.c
··· 417 417 } 418 418 419 419 /* Read datablock stored packed inside a fragment (tail-end packed block) */ 420 - static int squashfs_readpage_fragment(struct page *page, int expected) 420 + static int squashfs_readpage_fragment(struct folio *folio, int expected) 421 421 { 422 - struct inode *inode = page->mapping->host; 422 + struct inode *inode = folio->mapping->host; 423 423 struct squashfs_cache_entry *buffer = squashfs_get_fragment(inode->i_sb, 424 424 squashfs_i(inode)->fragment_block, 425 425 squashfs_i(inode)->fragment_size); ··· 430 430 squashfs_i(inode)->fragment_block, 431 431 squashfs_i(inode)->fragment_size); 432 432 else 433 - squashfs_copy_cache(page, buffer, expected, 433 + squashfs_copy_cache(&folio->page, buffer, expected, 434 434 squashfs_i(inode)->fragment_offset); 435 435 436 436 squashfs_cache_put(buffer); ··· 474 474 else 475 475 res = squashfs_readpage_block(&folio->page, block, res, expected); 476 476 } else 477 - res = squashfs_readpage_fragment(&folio->page, expected); 477 + res = squashfs_readpage_fragment(folio, expected); 478 478 479 479 if (!res) 480 480 return 0;