From a21ca34904e0a83b3eb9f7f63686a49e35e3fc64 Mon Sep 17 00:00:00 2001 From: Michel Lespinasse Date: Thu, 29 Apr 2021 10:28:25 -0700 Subject: [PATCH] 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 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 Change-Id: Idafc81074cf7f4b31985bdb24e0cc1597c91b875 --- fs/ext4/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index b5efe92b5c6d..636963095b2f 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -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)