summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* iomap: Convert to release_folioMatthew Wilcox (Oracle)2022-05-106-17/+15
| | | | | | | | Change all the filesystems which used iomap_releasepage to use the new function. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
* fs: Add aops->release_folioMatthew Wilcox (Oracle)2022-05-105-32/+34
| | | | | | | | This replaces aops->releasepage. Update the documentation, and call it if it exists. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
* mm/filemap: Hoist filler_t decision to the top of do_read_cache_folio()Matthew Wilcox (Oracle)2022-05-091-5/+4
| | | | | | | | Now that filler_t and aops->read_folio() have the same type, we can decide which one to use at the top of the function, and cache ->read_folio in the filler parameter. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Change the type of filler_tMatthew Wilcox (Oracle)2022-05-097-55/+47
| | | | | | | | | | | | By making filler_t the same as read_folio, we can use the same function for both in gfs2. We can push the use of folios down one more level in jffs2 and nfs. We also increase type safety for future users of the various read_cache_page() family of functions by forcing the parameter to be a pointer to struct file (or NULL). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
* nfs: Pass the file pointer to nfs_symlink_filler()Matthew Wilcox (Oracle)2022-05-091-2/+2
| | | | | | | | | In preparation for unifying the read_cache_page() and read_folio() implementations, make nfs_symlink_filler() get the inode from the page instead of passing it in from read_cache_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* jffs2: Pass the file pointer to jffs2_do_readpage_unlock()Matthew Wilcox (Oracle)2022-05-092-3/+3
| | | | | | | | | In preparation for unifying the read_cache_page() and read_folio() implementations, make jffs2_do_readpage_unlock() get the inode from the page instead of passing it in from read_cache_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* mm,fs: Remove aops->readpageMatthew Wilcox (Oracle)2022-05-0910-33/+19
| | | | | | | With all implementations of aops->readpage converted to aops->read_folio, we can stop checking whether it's set and remove the member from aops. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* mm: Convert swap_readpage to call read_folio instead of readpageMatthew Wilcox (Oracle)2022-05-091-1/+1
| | | | | | | | This commit is split out so it can be dropped when resolving conflicts with Neil Brown's series to stop calling ->readpage in the swap code. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* vboxsf: Convert vboxsf to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* udf: Convert adinicb and symlinks to read_folioMatthew Wilcox (Oracle)2022-05-092-7/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ubifs: Convert ubifs to read_folioMatthew Wilcox (Oracle)2022-05-092-6/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* squashfs: Convert squashfs to read_folioMatthew Wilcox (Oracle)2022-05-093-5/+7
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* romfs: Convert romfs to read_folioMatthew Wilcox (Oracle)2022-05-091-4/+5
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* orangefs: Convert orangefs to read_folioMatthew Wilcox (Oracle)2022-05-091-17/+16
| | | | | | | This is a full conversion which should be large folio ready, although I have not tested it. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ocfs2: Convert ocfs2 to read_folioMatthew Wilcox (Oracle)2022-05-094-6/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ntfs: Convert ntfs to read_folioMatthew Wilcox (Oracle)2022-05-096-28/+30
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* nfs: Convert nfs to read_folioMatthew Wilcox (Oracle)2022-05-093-4/+5
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* jfs: Convert metadata pages to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* jffs2: Convert jffs2 to read_folioMatthew Wilcox (Oracle)2022-05-092-6/+6
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* isofs: Convert symlinks and zisofs to read_folioMatthew Wilcox (Oracle)2022-05-092-5/+7
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* hpfs: Convert symlinks to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* hostfs: Convert hostfs to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fuse: Convert fuse to read_folioMatthew Wilcox (Oracle)2022-05-092-7/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* freevxfs: Convert vxfs_immed to read_folioMatthew Wilcox (Oracle)2022-05-091-7/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* f2fs: Convert f2fs to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ext4: Convert ext4 to read_folioMatthew Wilcox (Oracle)2022-05-092-6/+7
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* erofs: Convert erofs zdata to read_folioMatthew Wilcox (Oracle)2022-05-091-3/+4
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* efs: Convert efs symlinks to read_folioMatthew Wilcox (Oracle)2022-05-091-2/+3
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ecryptfs: Convert ecryptfs to read_folioMatthew Wilcox (Oracle)2022-05-091-5/+6
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* cramfs: Convert cramfs to read_folioMatthew Wilcox (Oracle)2022-05-092-7/+8
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* coda: Convert coda to read_folioMatthew Wilcox (Oracle)2022-05-091-3/+4
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* cifs: Convert cifs to read_folioMatthew Wilcox (Oracle)2022-05-091-6/+7
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. CIFS should probably be converted to use netfs_read_folio() by someone familiar with it. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* btrfs: Convert btrfs to read_folioMatthew Wilcox (Oracle)2022-05-097-13/+15
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* befs: Convert befs to read_folioMatthew Wilcox (Oracle)2022-05-091-3/+4
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* afs: Convert afs_symlink_readpage to afs_symlink_read_folioMatthew Wilcox (Oracle)2022-05-091-8/+7
| | | | | | | This function mostly used folios already, and only a few minor changes were needed. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* affs: Convert affs to read_folioMatthew Wilcox (Oracle)2022-05-092-4/+6
| | | | | | | | This is a "weak" conversion which converts straight back to using pages. A full conversion should be performed at some point, hopefully by someone familiar with the filesystem. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Convert simple_readpage to simple_read_folioMatthew Wilcox (Oracle)2022-05-091-7/+7
| | | | | | | This is a full folio conversion; it is prepared to handle folios of arbitrary size. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Convert mpage_readpage to mpage_read_folioMatthew Wilcox (Oracle)2022-05-0914-47/+49
| | | | | | | | | mpage_readpage still works in terms of pages, and has not been audited for correctness with large folios, so include an assertion that the filesystem is not passing it large folios. Convert all the filesystems to call mpage_read_folio() instead of mpage_readpage(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Convert block_read_full_page() to block_read_full_folio()Matthew Wilcox (Oracle)2022-05-0924-101/+108
| | | | | | | | | This function is NOT converted to handle large folios, so include an assert that the filesystem isn't passing one in. Otherwise, use the folio functions instead of the page functions, where they exist. Convert all filesystems which use block_read_full_page(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Convert iomap_readpage to iomap_read_folioMatthew Wilcox (Oracle)2022-05-096-19/+18
| | | | | | A straightforward conversion as iomap_readpage already worked in folios. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Convert netfs_readpage to netfs_read_folioMatthew Wilcox (Oracle)2022-05-095-12/+11
| | | | | | This is straightforward because netfs already worked in terms of folios. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Add read_folio documentationMatthew Wilcox (Oracle)2022-05-095-21/+21
| | | | | | Convert all the ->readpage documentation to ->read_folio. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Introduce aops->read_folioMatthew Wilcox (Oracle)2022-05-098-13/+28
| | | | | | | | Change all the callers of ->readpage to call ->read_folio in preference, if it exists. This is a transitional duplication, and will be removed by the end of the series. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* buffer: Rewrite nobh_truncate_page() to use foliosMatthew Wilcox (Oracle)2022-05-081-37/+27
| | | | | | | | | | | | - Calculate iblock directly instead of using a while loop - Move has_buffers to the end to remove a backwards jump - Use __filemap_get_folio() instead of grab_cache_page(), which removes a spurious FGP_ACCESSED flag. - Eliminate length and pos variables - Use folio APIs where they exist Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* mm/readahead: Convert page_cache_async_readahead to take a folioMatthew Wilcox (Oracle)2022-05-084-21/+22
| | | | | | | | Removes a couple of calls to compound_head and saves a few bytes. Also convert verity's read_file_data_page() to be folio-based. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* fs: Convert is_dirty_writeback() to take a folioMatthew Wilcox (Oracle)2022-05-086-28/+25
| | | | | | | | Pass a folio instead of a page to aops->is_dirty_writeback(). Convert both implementations and the caller. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* readahead: Use a folio in read_pages()Matthew Wilcox (Oracle)2022-05-081-13/+12
| | | | | | | | Handle multi-page folios correctly and removes a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* filemap: Update the folio_mark_dirty documentationMatthew Wilcox (Oracle)2022-05-081-4/+6
| | | | | | | The previous comment was not terribly helpful. Be a bit more explicit about the necessary locking environment. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* filemap: Update the folio_lock documentationMatthew Wilcox (Oracle)2022-05-081-2/+57
| | | | | | Add kernel-doc for several functions relating to take the folio lock. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* filemap: Remove obsolete comment in lock_pageMiaohe Lin2022-05-081-3/+0
| | | | | | | | | | | We no longer need the page's inode pinned. This comment dates back to commit db37648cd6ce ("[PATCH] mm: non syncing lock_page()") which added lock_page_nosync(). That was removed by commit 7eaceaccab5f ("block: remove per-queue plugging") which also made this comment obsolete. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>