mm: allow drivers to prevent new writable mappings
[deliverable/linux.git] / kernel / fork.c
index fa9124322cd4461b17a2b983917e2c9dc93333f9..1380d8ace334be7f7d6b49d760ed5c6013e4c7bb 100644 (file)
@@ -429,7 +429,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                                atomic_dec(&inode->i_writecount);
                        mutex_lock(&mapping->i_mmap_mutex);
                        if (tmp->vm_flags & VM_SHARED)
-                               mapping->i_mmap_writable++;
+                               atomic_inc(&mapping->i_mmap_writable);
                        flush_dcache_mmap_lock(mapping);
                        /* insert tmp into the share list, just after mpnt */
                        if (unlikely(tmp->vm_flags & VM_NONLINEAR))
This page took 0.030408 seconds and 5 git commands to generate.