summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2018-02-25 10:24:59 +0000
committerhselasky <hselasky@FreeBSD.org>2018-02-25 10:24:59 +0000
commitbfffab37b23935750859ca9b65eb3d2adde9d4d9 (patch)
treefd4f6c8d3b47c6f2d81fc2ae9d13ce8050e441ba
parent32b86dd3c5a618d959b377409734aed1f457eae4 (diff)
downloadFreeBSD-src-bfffab37b23935750859ca9b65eb3d2adde9d4d9.zip
FreeBSD-src-bfffab37b23935750859ca9b65eb3d2adde9d4d9.tar.gz
MFC r329467:
Add support for mmgrab() function in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> Sponsored by: Mellanox Technologies
-rw-r--r--sys/compat/linuxkpi/common/include/linux/mm_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mm_types.h b/sys/compat/linuxkpi/common/include/linux/mm_types.h
index 44aad34..81eb278 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm_types.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm_types.h
@@ -62,6 +62,12 @@ mmput(struct mm_struct *mm)
mmdrop(mm);
}
+static inline void
+mmgrab(struct mm_struct *mm)
+{
+ atomic_inc(&mm->mm_count);
+}
+
extern struct mm_struct *linux_get_task_mm(struct task_struct *);
#define get_task_mm(task) linux_get_task_mm(task)
OpenPOWER on IntegriCloud