diff options
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -162,6 +162,8 @@ static int shm_mmap(struct file * file, struct vm_area_struct * vma) | |||
162 | ret = shmem_mmap(file, vma); | 162 | ret = shmem_mmap(file, vma); |
163 | if (ret == 0) { | 163 | if (ret == 0) { |
164 | vma->vm_ops = &shm_vm_ops; | 164 | vma->vm_ops = &shm_vm_ops; |
165 | if (!(vma->vm_flags & VM_WRITE)) | ||
166 | vma->vm_flags &= ~VM_MAYWRITE; | ||
165 | shm_inc(file->f_dentry->d_inode->i_ino); | 167 | shm_inc(file->f_dentry->d_inode->i_ino); |
166 | } | 168 | } |
167 | 169 | ||