summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2021-04-22 12:08:20 +0200
committerDavid Hildenbrand <david@redhat.com>2021-09-03 18:42:01 +0200
commit8d0920bde5eb8ec7e567939b85e65a0596c8580d (patch)
treecdba733cd679ff5527daab0e8303a4da97adec4b /kernel/fork.c
parent4589ff7ca81516381393649dec8dd4948884b2b2 (diff)
mm: remove VM_DENYWRITE
All in-tree users of MAP_DENYWRITE are gone. MAP_DENYWRITE cannot be set from user space, so all users are gone; let's remove it. Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 7677f897ecb6..feef1057081d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -570,12 +570,9 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
tmp->vm_flags &= ~(VM_LOCKED | VM_LOCKONFAULT);
file = tmp->vm_file;
if (file) {
- struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
get_file(file);
- if (tmp->vm_flags & VM_DENYWRITE)
- put_write_access(inode);
i_mmap_lock_write(mapping);
if (tmp->vm_flags & VM_SHARED)
mapping_allow_writable(mapping);