Brian Geffon 14d071134c Revert "mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio"
This reverts commit cd544fd1dc9293c6702fab6effa63dac1cc67e99.

As discussed in [1] this commit was a no-op because the mapping type was
checked in vma_to_resize before move_vma is ever called.  This meant that
vm_ops->mremap() would never be called on such mappings.  Furthermore,
we've since expanded support of MREMAP_DONTUNMAP to non-anonymous
mappings, and these special mappings are still protected by the existing
check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EINVAL.

1. https://lkml.org/lkml/2020/12/28/2340

Link: https://lkml.kernel.org/r/20210323182520.2712101-2-bgeffon@google.com
Signed-off-by: Brian Geffon <bgeffon@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: "Michael S . Tsirkin" <mst@redhat.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Sonny Rao <sonnyrao@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-30 11:20:39 -07:00
..
2021-01-24 14:27:20 +01:00
2021-02-23 13:39:45 -08:00
2021-04-27 13:27:39 -07:00
2021-01-24 14:27:20 +01:00
2021-03-30 16:54:49 -07:00
2021-01-24 14:27:20 +01:00
2021-04-12 15:04:29 +02:00
2021-04-12 15:04:29 +02:00
2021-04-10 03:20:19 +08:00
\n
2021-04-29 11:06:13 -07:00
\n
2021-04-29 11:06:13 -07:00
2021-04-27 13:08:12 -07:00
2021-02-23 13:39:45 -08:00
2021-04-29 10:33:35 -07:00
2021-01-24 14:27:20 +01:00
2021-04-12 15:04:29 +02:00
2021-01-24 14:27:20 +01:00
2021-03-30 16:54:49 -07:00
2021-04-12 15:04:29 +02:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:20 +01:00
2021-04-26 23:23:41 +01:00
2021-04-27 13:42:11 -07:00
2021-04-12 15:04:30 +02:00
2021-04-30 11:20:35 -07:00
2021-01-24 14:27:20 +01:00
2021-04-29 14:24:39 -07:00
2021-04-27 18:09:44 -07:00
2021-02-24 13:38:26 -08:00
\n
2021-04-29 10:51:29 -07:00
2021-01-24 14:27:20 +01:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:20 +01:00
2020-09-10 14:03:31 -07:00
2021-04-29 10:43:51 -07:00
\n
2021-04-29 11:06:13 -07:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:20 +01:00
2021-04-28 14:39:37 -07:00
2021-02-24 13:38:26 -08:00
2021-02-24 13:38:26 -08:00
2021-02-23 13:39:45 -08:00
2021-01-24 14:27:19 +01:00
2021-04-27 12:49:42 -07:00
2021-02-23 13:39:45 -08:00
2021-04-28 14:56:09 -07:00
2021-04-12 15:04:23 +02:00
2021-03-23 11:20:25 +01:00
2021-04-26 13:24:39 -07:00
2021-04-27 12:49:42 -07:00
2021-02-23 13:39:45 -08:00
2021-02-24 13:38:26 -08:00
2021-01-24 14:27:20 +01:00
2021-01-24 14:27:19 +01:00
2021-02-21 11:02:48 -08:00
2021-01-24 14:27:20 +01:00
2021-02-13 17:17:53 +01:00
2021-01-24 14:27:18 +01:00