clk: samsung: exynos5433: Add clocks for CMU_ATLAS domain
[firefly-linux-kernel-4.4.55.git] / kernel / fork.c
index 9b7d746d6d629c3d9d1c937a677271f027a5fe2b..4dc2ddade9f1f288aaa08d8a665f1fded2ba88cc 100644 (file)
@@ -433,7 +433,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                        get_file(file);
                        if (tmp->vm_flags & VM_DENYWRITE)
                                atomic_dec(&inode->i_writecount);
-                       mutex_lock(&mapping->i_mmap_mutex);
+                       i_mmap_lock_write(mapping);
                        if (tmp->vm_flags & VM_SHARED)
                                atomic_inc(&mapping->i_mmap_writable);
                        flush_dcache_mmap_lock(mapping);
@@ -445,7 +445,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                                vma_interval_tree_insert_after(tmp, mpnt,
                                                        &mapping->i_mmap);
                        flush_dcache_mmap_unlock(mapping);
-                       mutex_unlock(&mapping->i_mmap_mutex);
+                       i_mmap_unlock_write(mapping);
                }
 
                /*
@@ -1022,11 +1022,14 @@ void __cleanup_sighand(struct sighand_struct *sighand)
 {
        if (atomic_dec_and_test(&sighand->count)) {
                signalfd_cleanup(sighand);
+               /*
+                * sighand_cachep is SLAB_DESTROY_BY_RCU so we can free it
+                * without an RCU grace period, see __lock_task_sighand().
+                */
                kmem_cache_free(sighand_cachep, sighand);
        }
 }
 
-
 /*
  * Initialize POSIX timer handling for a thread group.
  */