BACKPORT: FROMLIST: ext4: implement speculative fault handling

We just need to make sure ext4_filemap_fault() doesn't block in the
speculative case as it is called with an rcu read lock held.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://lore.kernel.org/all/20210407014502.24091-32-michel@lespinasse.org/

Conflicts:
    fs/ext4/inode.c

1. The change in fs/ext4/inode.c is not needed since i_mmap_sem is not
used anymore.

Bug: 161210518
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Idafc81074cf7f4b31985bdb24e0cc1597c91b875
This commit is contained in:
Michel Lespinasse
2021-04-29 10:28:25 -07:00
committed by Todd Kjos
parent 7d6787088d
commit a21ca34904

View File

@@ -763,6 +763,7 @@ static const struct vm_operations_struct ext4_file_vm_ops = {
.fault = filemap_fault,
.map_pages = filemap_map_pages,
.page_mkwrite = ext4_page_mkwrite,
.speculative = true,
};
static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma)