aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/shm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 6b0c9af5bbf7..1c2faf62bc73 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -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