summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/file.c36
-rw-r--r--fs/afs/internal.h1
-rw-r--r--fs/afs/write.c1
-rw-r--r--fs/binfmt_elf.c3
-rw-r--r--fs/btrfs/compression.c2
-rw-r--r--fs/btrfs/extent_io.c6
-rw-r--r--fs/btrfs/tests/extent-io-tests.c2
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/ceph/addr.c2
-rw-r--r--fs/dax.c3
-rw-r--r--fs/erofs/data.c3
-rw-r--r--fs/ext4/file.c1
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/page-io.c1
-rw-r--r--fs/ext4/readpage.c1
-rw-r--r--fs/f2fs/checkpoint.c2
-rw-r--r--fs/f2fs/compress.c2
-rw-r--r--fs/f2fs/data.c2
-rw-r--r--fs/f2fs/f2fs.h2
-rw-r--r--fs/f2fs/file.c1
-rw-r--r--fs/f2fs/node.c2
-rw-r--r--fs/gfs2/aops.c2
-rw-r--r--fs/hugetlbfs/inode.c22
-rw-r--r--fs/mpage.c1
-rw-r--r--fs/netfs/buffered_write.c1
-rw-r--r--fs/nfs/blocklayout/blocklayout.c1
-rw-r--r--fs/nfs/dir.c1
-rw-r--r--fs/nilfs2/btree.c2
-rw-r--r--fs/nilfs2/page.c2
-rw-r--r--fs/nilfs2/segment.c2
-rw-r--r--fs/ntfs3/file.c2
-rw-r--r--fs/ocfs2/refcounttree.c1
-rw-r--r--fs/proc/meminfo.c3
-rw-r--r--fs/proc/vmcore.c2
-rw-r--r--fs/pstore/ram_core.c2
-rw-r--r--fs/ramfs/file-nommu.c2
-rw-r--r--fs/resctrl/pseudo_lock.c2
-rw-r--r--fs/smb/client/connect.c1
-rw-r--r--fs/smb/client/file.c1
-rw-r--r--fs/zonefs/file.c3
40 files changed, 61 insertions, 69 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index f609366fd2ac..85696ac984cc 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -28,6 +28,8 @@ static ssize_t afs_file_splice_read(struct file *in, loff_t *ppos,
static void afs_vm_open(struct vm_area_struct *area);
static void afs_vm_close(struct vm_area_struct *area);
static vm_fault_t afs_vm_map_pages(struct vm_fault *vmf, pgoff_t start_pgoff, pgoff_t end_pgoff);
+static int afs_mapped(unsigned long start, unsigned long end, pgoff_t pgoff,
+ const struct file *file, void **vm_private_data);
const struct file_operations afs_file_operations = {
.open = afs_open,
@@ -61,6 +63,7 @@ const struct address_space_operations afs_file_aops = {
};
static const struct vm_operations_struct afs_vm_ops = {
+ .mapped = afs_mapped,
.open = afs_vm_open,
.close = afs_vm_close,
.fault = filemap_fault,
@@ -494,32 +497,45 @@ static void afs_drop_open_mmap(struct afs_vnode *vnode)
*/
static int afs_file_mmap_prepare(struct vm_area_desc *desc)
{
- struct afs_vnode *vnode = AFS_FS_I(file_inode(desc->file));
int ret;
- afs_add_open_mmap(vnode);
-
ret = generic_file_mmap_prepare(desc);
- if (ret == 0)
- desc->vm_ops = &afs_vm_ops;
- else
- afs_drop_open_mmap(vnode);
+ if (ret)
+ return ret;
+
+ desc->vm_ops = &afs_vm_ops;
return ret;
}
+static int afs_mapped(unsigned long start, unsigned long end, pgoff_t pgoff,
+ const struct file *file, void **vm_private_data)
+{
+ struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
+
+ afs_add_open_mmap(vnode);
+ return 0;
+}
+
static void afs_vm_open(struct vm_area_struct *vma)
{
- afs_add_open_mmap(AFS_FS_I(file_inode(vma->vm_file)));
+ struct file *file = vma->vm_file;
+ struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
+
+ afs_add_open_mmap(vnode);
}
static void afs_vm_close(struct vm_area_struct *vma)
{
- afs_drop_open_mmap(AFS_FS_I(file_inode(vma->vm_file)));
+ struct file *file = vma->vm_file;
+ struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
+
+ afs_drop_open_mmap(vnode);
}
static vm_fault_t afs_vm_map_pages(struct vm_fault *vmf, pgoff_t start_pgoff, pgoff_t end_pgoff)
{
- struct afs_vnode *vnode = AFS_FS_I(file_inode(vmf->vma->vm_file));
+ struct file *file = vmf->vma->vm_file;
+ struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
if (afs_check_validity(vnode))
return filemap_map_pages(vmf, start_pgoff, end_pgoff);
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 009064b8d661..599353c33337 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -31,7 +31,6 @@
#define AFS_CELL_MAX_ADDRS 15
-struct pagevec;
struct afs_call;
struct afs_vnode;
struct afs_server_probe;
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 93ad86ff3345..fcfed9d24e0a 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -10,7 +10,6 @@
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/netfs.h>
#include <trace/events/netfs.h>
#include "internal.h"
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index fb857faaf0d6..16a56b6b3f6c 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -453,14 +453,13 @@ static unsigned long elf_load(struct file *filep, unsigned long addr,
zero_end = ELF_PAGEALIGN(zero_end);
error = vm_brk_flags(zero_start, zero_end - zero_start,
- prot & PROT_EXEC ? VM_EXEC : 0);
+ prot & PROT_EXEC);
if (error)
map_addr = error;
}
return map_addr;
}
-
static unsigned long total_mapping_size(const struct elf_phdr *phdr, int nr)
{
elf_addr_t min_addr = -1;
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index c5783ac1b646..b2393a48a8fe 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -8,7 +8,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/highmem.h>
#include <linux/kthread.h>
#include <linux/time.h>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 1ba8a7d3587b..ca3e4b99aec2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -11,7 +11,7 @@
#include <linux/blkdev.h>
#include <linux/swap.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/prefetch.h>
#include <linux/fsverity.h>
#include <linux/lockdep.h>
@@ -2093,13 +2093,13 @@ static void buffer_tree_tag_for_writeback(struct btrfs_fs_info *fs_info,
struct eb_batch {
unsigned int nr;
unsigned int cur;
- struct extent_buffer *ebs[PAGEVEC_SIZE];
+ struct extent_buffer *ebs[FOLIO_BATCH_SIZE];
};
static inline bool eb_batch_add(struct eb_batch *batch, struct extent_buffer *eb)
{
batch->ebs[batch->nr++] = eb;
- return (batch->nr < PAGEVEC_SIZE);
+ return (batch->nr < FOLIO_BATCH_SIZE);
}
static inline void eb_batch_init(struct eb_batch *batch)
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index a0187d6163df..b2aacf846c8b 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -4,7 +4,7 @@
*/
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/sizes.h>
diff --git a/fs/buffer.c b/fs/buffer.c
index e6980dab1a7f..4d7f84e77d2f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -45,7 +45,7 @@
#include <linux/bitops.h>
#include <linux/mpage.h>
#include <linux/bit_spinlock.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched/mm.h>
#include <trace/events/block.h>
#include <linux/fscrypt.h>
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 2090fc78529c..bbeafbc777ee 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -7,7 +7,7 @@
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/signal.h>
#include <linux/iversion.h>
diff --git a/fs/dax.c b/fs/dax.c
index 289e6254aa30..a5237169b467 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -15,7 +15,6 @@
#include <linux/memcontrol.h>
#include <linux/mm.h>
#include <linux/mutex.h>
-#include <linux/pagevec.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
#include <linux/uio.h>
@@ -1360,7 +1359,7 @@ static vm_fault_t dax_load_hole(struct xa_state *xas, struct vm_fault *vmf,
{
struct inode *inode = iter->inode;
unsigned long vaddr = vmf->address;
- unsigned long pfn = my_zero_pfn(vaddr);
+ unsigned long pfn = zero_pfn(vaddr);
vm_fault_t ret;
*entry = dax_insert_entry(xas, vmf, iter, *entry, pfn, DAX_ZERO_PAGE);
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 132a27deb2f3..1e022142b188 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -487,8 +487,7 @@ static int erofs_file_mmap_prepare(struct vm_area_desc *desc)
if (!IS_DAX(file_inode(desc->file)))
return generic_file_readonly_mmap_prepare(desc);
- if (vma_desc_test_flags(desc, VMA_SHARED_BIT) &&
- vma_desc_test_flags(desc, VMA_MAYWRITE_BIT))
+ if (vma_desc_test_all(desc, VMA_SHARED_BIT, VMA_MAYWRITE_BIT))
return -EINVAL;
desc->vm_ops = &erofs_dax_vm_ops;
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index f1dc5ce791a7..5e02f6cf653e 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -27,7 +27,6 @@
#include <linux/dax.h>
#include <linux/filelock.h>
#include <linux/quotaops.h>
-#include <linux/pagevec.h>
#include <linux/uio.h>
#include <linux/mman.h>
#include <linux/backing-dev.h>
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 028e9821dacc..64dba7679245 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -29,7 +29,7 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mpage.h>
#include <linux/rmap.h>
#include <linux/namei.h>
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 3c089fcb012c..dc82e7b57e75 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -16,7 +16,6 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/mpage.h>
#include <linux/namei.h>
#include <linux/uio.h>
diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
index 6ec503bde00b..dd3627c71732 100644
--- a/fs/ext4/readpage.c
+++ b/fs/ext4/readpage.c
@@ -43,7 +43,6 @@
#include <linux/mpage.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
-#include <linux/pagevec.h>
#include "ext4.h"
#include <trace/events/ext4.h>
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 6dd39b7de11a..0143365c07dc 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -11,7 +11,7 @@
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/f2fs_fs.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/swap.h>
#include <linux/kthread.h>
#include <linux/delayacct.h>
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 0b8be500db65..50fac72734ac 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -13,7 +13,7 @@
#include <linux/lzo.h>
#include <linux/lz4.h>
#include <linux/zstd.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include "f2fs.h"
#include "node.h"
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 07b4ed6bb0cc..cf05014fa5e3 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -10,7 +10,7 @@
#include <linux/sched/mm.h>
#include <linux/mpage.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/blk-crypto.h>
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 760e6d80bbdd..7d0a467982d6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -28,8 +28,6 @@
#include <linux/fscrypt.h>
#include <linux/fsverity.h>
-struct pagevec;
-
#ifdef CONFIG_F2FS_CHECK_FS
#define f2fs_bug_on(sbi, condition) BUG_ON(condition)
#else
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 56e93ebd52ab..42f5832242b3 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -17,7 +17,6 @@
#include <linux/compat.h>
#include <linux/uaccess.h>
#include <linux/mount.h>
-#include <linux/pagevec.h>
#include <linux/uio.h>
#include <linux/uuid.h>
#include <linux/file.h>
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 2856d5dbdd00..e5b4a5b97b57 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -10,7 +10,7 @@
#include <linux/mpage.h>
#include <linux/sched/mm.h>
#include <linux/blkdev.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/swap.h>
#include "f2fs.h"
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index e79ad087512a..dae3dc4ee6f7 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -10,7 +10,7 @@
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mpage.h>
#include <linux/fs.h>
#include <linux/writeback.h>
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 6ad02493adfd..8b05bec08e04 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -25,7 +25,7 @@
#include <linux/ctype.h>
#include <linux/backing-dev.h>
#include <linux/hugetlb.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/fs_parser.h>
#include <linux/mman.h>
#include <linux/slab.h>
@@ -164,7 +164,7 @@ static int hugetlbfs_file_mmap_prepare(struct vm_area_desc *desc)
goto out;
ret = 0;
- if (vma_desc_test_flags(desc, VMA_WRITE_BIT) && inode->i_size < len)
+ if (vma_desc_test(desc, VMA_WRITE_BIT) && inode->i_size < len)
i_size_write(inode, len);
out:
inode_unlock(inode);
@@ -513,15 +513,11 @@ hugetlb_vmdelete_list(struct rb_root_cached *root, pgoff_t start, pgoff_t end,
/*
* Called with hugetlb fault mutex held.
- * Returns true if page was actually removed, false otherwise.
*/
-static bool remove_inode_single_folio(struct hstate *h, struct inode *inode,
- struct address_space *mapping,
- struct folio *folio, pgoff_t index,
- bool truncate_op)
+static void remove_inode_single_folio(struct hstate *h, struct inode *inode,
+ struct address_space *mapping, struct folio *folio,
+ pgoff_t index, bool truncate_op)
{
- bool ret = false;
-
/*
* If folio is mapped, it was faulted in after being
* unmapped in caller or hugetlb_vmdelete_list() skips
@@ -543,7 +539,6 @@ static bool remove_inode_single_folio(struct hstate *h, struct inode *inode,
*/
VM_BUG_ON_FOLIO(folio_test_hugetlb_restore_reserve(folio), folio);
hugetlb_delete_from_page_cache(folio);
- ret = true;
if (!truncate_op) {
if (unlikely(hugetlb_unreserve_pages(inode, index,
index + 1, 1)))
@@ -551,7 +546,6 @@ static bool remove_inode_single_folio(struct hstate *h, struct inode *inode,
}
folio_unlock(folio);
- return ret;
}
/*
@@ -599,9 +593,9 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart,
/*
* Remove folio that was part of folio_batch.
*/
- if (remove_inode_single_folio(h, inode, mapping, folio,
- index, truncate_op))
- freed++;
+ remove_inode_single_folio(h, inode, mapping, folio,
+ index, truncate_op);
+ freed++;
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
}
diff --git a/fs/mpage.c b/fs/mpage.c
index b3d9f231a04a..f02d8ebd72af 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -28,7 +28,6 @@
#include <linux/mm_inline.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
-#include <linux/pagevec.h>
#include "internal.h"
/*
diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c
index 22a4d61631c9..05ea5b0cc0e8 100644
--- a/fs/netfs/buffered_write.c
+++ b/fs/netfs/buffered_write.c
@@ -10,7 +10,6 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
-#include <linux/pagevec.h>
#include "internal.h"
static void __netfs_set_group(struct folio *folio, struct netfs_group *netfs_group)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index cb0a645aeb50..11f9f69cde61 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -36,7 +36,6 @@
#include <linux/namei.h>
#include <linux/bio.h> /* struct bio */
#include <linux/prefetch.h>
-#include <linux/pagevec.h>
#include "../pnfs.h"
#include "../nfs4session.h"
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ddc3789363a5..c1e629fbd131 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -32,7 +32,6 @@
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/swap.h>
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 3c03f5a741d1..64d5f7c5ab44 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -10,7 +10,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/errno.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include "nilfs.h"
#include "page.h"
#include "btnode.h"
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
index 56c4da417b6a..a9d8aa65416f 100644
--- a/fs/nilfs2/page.c
+++ b/fs/nilfs2/page.c
@@ -14,7 +14,7 @@
#include <linux/page-flags.h>
#include <linux/list.h>
#include <linux/highmem.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/gfp.h>
#include "nilfs.h"
#include "page.h"
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 4b1bf559f352..1491a4d4b1e1 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -19,7 +19,7 @@
#include <linux/freezer.h>
#include <linux/kthread.h>
#include <linux/crc32.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index 570c92fa7ee7..fb07afef84d0 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -276,7 +276,7 @@ static int ntfs_file_mmap_prepare(struct vm_area_desc *desc)
struct file *file = desc->file;
struct inode *inode = file_inode(file);
struct ntfs_inode *ni = ntfs_i(inode);
- const bool rw = vma_desc_test_flags(desc, VMA_WRITE_BIT);
+ const bool rw = vma_desc_test(desc, VMA_WRITE_BIT);
int err;
/* Avoid any operation if inode is bad. */
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 6d7f44d3e929..8eee5be4d1ed 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -31,7 +31,6 @@
#include <linux/blkdev.h>
#include <linux/slab.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/swap.h>
#include <linux/security.h>
#include <linux/string.h>
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index 65ba49ec3a63..b2813ff13cb2 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -126,7 +126,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
show_val_kb(m, "Committed_AS: ", committed);
seq_printf(m, "VmallocTotal: %8lu kB\n",
(unsigned long)VMALLOC_TOTAL >> 10);
- show_val_kb(m, "VmallocUsed: ", vmalloc_nr_pages());
+ show_val_kb(m, "VmallocUsed: ",
+ global_node_page_state(NR_VMALLOC));
show_val_kb(m, "VmallocChunk: ", 0ul);
show_val_kb(m, "Percpu: ", pcpu_nr_pages());
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index f188bd900eb2..44d15436439f 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -525,7 +525,7 @@ static int remap_oldmem_pfn_checked(struct vm_area_struct *vma,
{
unsigned long map_size;
unsigned long pos_start, pos_end, pos;
- unsigned long zeropage_pfn = my_zero_pfn(0);
+ unsigned long zeropage_pfn = zero_pfn(0);
size_t len = 0;
pos_start = pfn;
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 05048c6f787a..b4ec8009b8dc 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -449,7 +449,7 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size,
pages[i] = pfn_to_page(addr >> PAGE_SHIFT);
}
/*
- * VM_IOREMAP used here to bypass this region during vread()
+ * VM_IOREMAP used here to bypass this region during vread_iter()
* and kmap_atomic() (i.e. kcore) to avoid __va() failures.
*/
vaddr = vmap(pages, page_count, VM_MAP | VM_IOREMAP, prot);
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 0f8e838ece07..2f79bcb89d2e 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -14,7 +14,7 @@
#include <linux/string.h>
#include <linux/backing-dev.h>
#include <linux/ramfs.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mman.h>
#include <linux/sched.h>
#include <linux/slab.h>
diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
index fa3687d69ebd..d1cb0986006e 100644
--- a/fs/resctrl/pseudo_lock.c
+++ b/fs/resctrl/pseudo_lock.c
@@ -1044,7 +1044,7 @@ static int pseudo_lock_dev_mmap_prepare(struct vm_area_desc *desc)
* Ensure changes are carried directly to the memory being mapped,
* do not allow copy-on-write mapping.
*/
- if (!vma_desc_test_flags(desc, VMA_SHARED_BIT)) {
+ if (!vma_desc_test(desc, VMA_SHARED_BIT)) {
mutex_unlock(&rdtgroup_mutex);
return -EINVAL;
}
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 69b38f0ccf2b..ca1bc67eb23b 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -20,7 +20,6 @@
#include <linux/delay.h>
#include <linux/completion.h>
#include <linux/kthread.h>
-#include <linux/pagevec.h>
#include <linux/freezer.h>
#include <linux/namei.h>
#include <linux/uuid.h>
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index 5d5b49468aff..ebafc7994cb4 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -15,7 +15,6 @@
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
#include <linux/writeback.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/delay.h>
diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index 8a7161fc49e5..5ada33f70bb4 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -333,8 +333,7 @@ static int zonefs_file_mmap_prepare(struct vm_area_desc *desc)
* ordering between msync() and page cache writeback.
*/
if (zonefs_inode_is_seq(file_inode(file)) &&
- vma_desc_test_flags(desc, VMA_SHARED_BIT) &&
- vma_desc_test_flags(desc, VMA_MAYWRITE_BIT))
+ vma_desc_test_all(desc, VMA_SHARED_BIT, VMA_MAYWRITE_BIT))
return -EINVAL;
file_accessed(file);