]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge tag 'folio-6.0' of git://git.infradead.org/users/willy/pagecache
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Aug 2022 17:35:43 +0000 (10:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Aug 2022 17:35:43 +0000 (10:35 -0700)
Pull folio updates from Matthew Wilcox:

 - Fix an accounting bug that made NR_FILE_DIRTY grow without limit
   when running xfstests

 - Convert more of mpage to use folios

 - Remove add_to_page_cache() and add_to_page_cache_locked()

 - Convert find_get_pages_range() to filemap_get_folios()

 - Improvements to the read_cache_page() family of functions

 - Remove a few unnecessary checks of PageError

 - Some straightforward filesystem conversions to use folios

 - Split PageMovable users out from address_space_operations into
   their own movable_operations

 - Convert aops->migratepage to aops->migrate_folio

 - Remove nobh support (Christoph Hellwig)

* tag 'folio-6.0' of git://git.infradead.org/users/willy/pagecache: (78 commits)
  fs: remove the NULL get_block case in mpage_writepages
  fs: don't call ->writepage from __mpage_writepage
  fs: remove the nobh helpers
  jfs: stop using the nobh helper
  ext2: remove nobh support
  ntfs3: refactor ntfs_writepages
  mm/folio-compat: Remove migration compatibility functions
  fs: Remove aops->migratepage()
  secretmem: Convert to migrate_folio
  hugetlb: Convert to migrate_folio
  aio: Convert to migrate_folio
  f2fs: Convert to filemap_migrate_folio()
  ubifs: Convert to filemap_migrate_folio()
  btrfs: Convert btrfs_migratepage to migrate_folio
  mm/migrate: Add filemap_migrate_folio()
  mm/migrate: Convert migrate_page() to migrate_folio()
  nfs: Convert to migrate_folio
  btrfs: Convert btree_migratepage to migrate_folio
  mm/migrate: Convert expected_page_refs() to folio_expected_refs()
  mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio()
  ...

32 files changed:
1  2 
block/fops.c
block/partitions/core.c
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/buffer.c
fs/ext2/inode.c
fs/ext2/super.c
fs/ext4/inode.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/node.c
fs/gfs2/lops.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/iomap/buffered-io.c
fs/mpage.c
fs/ntfs/aops.c
fs/ntfs/file.c
fs/ntfs3/inode.c
fs/ntfs3/ntfs_fs.h
fs/ocfs2/aops.c
fs/remap_range.c
fs/zonefs/super.c
include/linux/buffer_head.h
include/linux/fs.h
include/linux/netfs.h
mm/filemap.c
mm/hugetlb.c
mm/memory-failure.c
mm/secretmem.c
mm/shmem.c
mm/swap.c

diff --cc block/fops.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/buffer.c
Simple merge
diff --cc fs/ext2/inode.c
Simple merge
diff --cc fs/ext2/super.c
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/f2fs/data.c
Simple merge
diff --cc fs/f2fs/f2fs.h
Simple merge
diff --cc fs/f2fs/node.c
Simple merge
diff --cc fs/gfs2/lops.c
Simple merge
Simple merge
diff --cc fs/inode.c
Simple merge
Simple merge
diff --cc fs/mpage.c
index c6d8bf8c22a526abac64773a0b3b9cf00d7a0309,8326ff8a7a96eb728f027f4c309ebdbd64820858..0f8ae954a579035253109dba0aa9592527be0964
@@@ -145,13 -147,16 +147,16 @@@ static struct bio *do_mpage_readpage(st
        struct block_device *bdev = NULL;
        int length;
        int fully_mapped = 1;
 -      int op = REQ_OP_READ;
 +      blk_opf_t opf = REQ_OP_READ;
        unsigned nblocks;
        unsigned relative_block;
-       gfp_t gfp = mapping_gfp_constraint(page->mapping, GFP_KERNEL);
+       gfp_t gfp = mapping_gfp_constraint(folio->mapping, GFP_KERNEL);
+       /* MAX_BUF_PER_PAGE, for example */
+       VM_BUG_ON_FOLIO(folio_test_large(folio), folio);
  
        if (args->is_readahead) {
 -              op |= REQ_RAHEAD;
 +              opf |= REQ_RAHEAD;
                gfp |= __GFP_NORETRY | __GFP_NOWARN;
        }
  
@@@ -266,10 -271,10 +271,10 @@@ alloc_new
        if (args->bio == NULL) {
                if (first_hole == blocks_per_page) {
                        if (!bdev_read_page(bdev, blocks[0] << (blkbits - 9),
-                                                               page))
+                                                               &folio->page))
                                goto out;
                }
 -              args->bio = bio_alloc(bdev, bio_max_segs(args->nr_pages), op,
 +              args->bio = bio_alloc(bdev, bio_max_segs(args->nr_pages), opf,
                                      gfp);
                if (args->bio == NULL)
                        goto confused;
diff --cc fs/ntfs/aops.c
Simple merge
diff --cc fs/ntfs/file.c
Simple merge
Simple merge
Simple merge
diff --cc fs/ocfs2/aops.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/filemap.c
Simple merge
diff --cc mm/hugetlb.c
Simple merge
Simple merge
diff --cc mm/secretmem.c
Simple merge
diff --cc mm/shmem.c
Simple merge
diff --cc mm/swap.c
Simple merge