svn commit: r329467 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Sat Feb 17 20:52:55 UTC 2018


Author: hselasky
Date: Sat Feb 17 20:52:54 2018
New Revision: 329467
URL: https://svnweb.freebsd.org/changeset/base/329467

Log:
  Add support for mmgrab() function in the LinuxKPI.
  
  MFC after:	1 week
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/mm_types.h

Modified: head/sys/compat/linuxkpi/common/include/linux/mm_types.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/mm_types.h	Sat Feb 17 20:50:18 2018	(r329466)
+++ head/sys/compat/linuxkpi/common/include/linux/mm_types.h	Sat Feb 17 20:52:54 2018	(r329467)
@@ -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)
 


More information about the svn-src-all mailing list