diff options
-rw-r--r-- | mm/memory.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/memory.c b/mm/memory.c index 17cebb97beae..74b45e258323 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5516,13 +5516,8 @@ fallback: nr_pages = folio_nr_pages(folio); - /* - * Using per-page fault to maintain the uffd semantics, and same - * approach also applies to non shmem/tmpfs faults to avoid - * inflating the RSS of the process. - */ - if (!vma_is_shmem(vma) || unlikely(userfaultfd_armed(vma)) || - unlikely(needs_fallback)) { + /* Using per-page fault to maintain the uffd semantics */ + if (unlikely(userfaultfd_armed(vma)) || unlikely(needs_fallback)) { nr_pages = 1; } else if (nr_pages > 1) { pgoff_t idx = folio_page_idx(folio, page); |