aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
commit1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch)
tree47da3feee8e263e8c9352c85cf518e624be3c211 /kernel/fork.c
parent750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff)
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 10646182440f..e702cb9ffbd8 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -946,6 +946,24 @@ void mmput(struct mm_struct *mm)
946} 946}
947EXPORT_SYMBOL_GPL(mmput); 947EXPORT_SYMBOL_GPL(mmput);
948 948
949#ifdef CONFIG_MMU
950static void mmput_async_fn(struct work_struct *work)
951{
952 struct mm_struct *mm = container_of(work, struct mm_struct,
953 async_put_work);
954
955 __mmput(mm);
956}
957
958void mmput_async(struct mm_struct *mm)
959{
960 if (atomic_dec_and_test(&mm->mm_users)) {
961 INIT_WORK(&mm->async_put_work, mmput_async_fn);
962 schedule_work(&mm->async_put_work);
963 }
964}
965#endif
966
949/** 967/**
950 * set_mm_exe_file - change a reference to the mm's executable file 968 * set_mm_exe_file - change a reference to the mm's executable file
951 * 969 *