summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* fs: Change the type of filler_tMatthew Wilcox (Oracle)2022-05-095-32/+24
| | | | | | | | | | | | 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-093-6/+3
| | | | | | | 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>
* 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-092-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>
* 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-0913-46/+48
| | | | | | | | | 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-0922-97/+104
| | | | | | | | | 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-095-18/+17
| | | | | | 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-094-11/+10
| | | | | | This is straightforward because netfs already worked in terms of folios. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* fs: Introduce aops->read_folioMatthew Wilcox (Oracle)2022-05-093-3/+6
| | | | | | | | 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-083-18/+19
| | | | | | | | 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-082-20/+17
| | | | | | | | 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>
* f2fs: Call aops write_begin() and write_end() directlyMatthew Wilcox (Oracle)2022-05-081-4/+5
| | | | | | | | pagecache_write_begin() and pagecache_write_end() are now trivial wrappers, so call the aops directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* ext4: Call aops write_begin() and write_end() directlyMatthew Wilcox (Oracle)2022-05-081-4/+5
| | | | | | | | pagecache_write_begin() and pagecache_write_end() are now trivial wrappers, so call the aops directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* hfsplus: Call hfsplus_write_begin() and generic_write_end() directlyMatthew Wilcox (Oracle)2022-05-083-7/+8
| | | | | | | | | There is only one kind of write_begin/write_end aops, so we don't need to look up which aop it is, just make hfsplus_write_begin() available to this file and call it directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* hfs: Call hfs_write_begin() and generic_write_end() directlyMatthew Wilcox (Oracle)2022-05-083-6/+7
| | | | | | | | | There is only one kind of write_begin/write_end aops, so we don't need to look up which aop it is, just make hfs_write_begin() available to this file and call it directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* ntfs3: Remove fsdata parameter from ntfs_extend_initialized_size()Matthew Wilcox (Oracle)2022-05-081-4/+2
| | | | | | | | | | | | | | | | | | | | | After the last patch, Smatch reports: fs/ntfs3/file.c:168 ntfs_extend_initialized_size() error: uninitialized symbol 'fsdata'. fsdata is indeed unused. This is not new, but Smatch couldn't see it before because calls through pagecache_write_begin()/pagecache_write_end() could theoretically call any implemention of ->write_begin/write_end, some of which do use fsdata. Now that the calls are direct, Smatch can see they're never used. Fix this by simply passing NULL. While ntfs3 does pass this parameter on to generic functions, those generic functions also never dereference the fsdata parameter, so it's unnecessary to pass the address of a real pointer. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
* ntfs3: Call ntfs_write_begin() and ntfs_write_end() directlyMatthew Wilcox (Oracle)2022-05-083-10/+12
| | | | | | | | | | There is only one kind of write_begin/write_end aops, so we don't need to look up which aop it is, just make ntfs_write_begin() and ntfs_write_end() available to this file and call them directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* namei: Call aops write_begin() and write_end() directlyMatthew Wilcox (Oracle)2022-05-081-3/+3
| | | | | | | | pagecache_write_begin() and pagecache_write_end() are now trivial wrappers, so call the aops directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* buffer: Call aops write_begin() and write_end() directlyMatthew Wilcox (Oracle)2022-05-081-6/+8
| | | | | | | | pagecache_write_begin() and pagecache_write_end() are now trivial wrappers, so call the aops directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
* fs: Remove flags parameter from aops->write_beginMatthew Wilcox (Oracle)2022-05-0837-55/+49
| | | | | | | There are no more aop flags left, so remove the parameter. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>