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

Configure Feed

Select the types of activity you want to include in your feed.

squashfs: pass the inode to squashfs_readahead_fragment()

Patch series "squashfs: Remove page->mapping references".

We're close to being able to kill page->mapping. These two patches get us
a little bit closer.


This patch (of 2):

Eliminate a reference to page->mapping by passing the inode from the
caller.

Link: https://lkml.kernel.org/r/20250612143903.2849289-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20250612143903.2849289-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
ca742a82 0ba5a25a

+3 -4
+3 -4
fs/squashfs/file.c
··· 493 493 return res; 494 494 } 495 495 496 - static int squashfs_readahead_fragment(struct page **page, 496 + static int squashfs_readahead_fragment(struct inode *inode, struct page **page, 497 497 unsigned int pages, unsigned int expected, loff_t start) 498 498 { 499 - struct inode *inode = page[0]->mapping->host; 500 499 struct squashfs_cache_entry *buffer = squashfs_get_fragment(inode->i_sb, 501 500 squashfs_i(inode)->fragment_block, 502 501 squashfs_i(inode)->fragment_size); ··· 604 605 605 606 if (start >> msblk->block_log == file_end && 606 607 squashfs_i(inode)->fragment_block != SQUASHFS_INVALID_BLK) { 607 - res = squashfs_readahead_fragment(pages, nr_pages, 608 - expected, start); 608 + res = squashfs_readahead_fragment(inode, pages, 609 + nr_pages, expected, start); 609 610 if (res) 610 611 goto skip_pages; 611 612 continue;