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

Hans Petter Selasky hselasky at FreeBSD.org
Fri Jan 24 13:05:53 UTC 2020


Author: hselasky
Date: Fri Jan 24 13:05:53 2020
New Revision: 357077
URL: https://svnweb.freebsd.org/changeset/base/357077

Log:
  Implement mmget_not_zero() in the LinuxKPI.
  
  Submitted by:	Austin Shafer <ashafer at badland.io>
  MFC after:	1 week
  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	Fri Jan 24 12:08:23 2020	(r357076)
+++ head/sys/compat/linuxkpi/common/include/linux/mm_types.h	Fri Jan 24 13:05:53 2020	(r357077)
@@ -57,6 +57,12 @@ mmdrop(struct mm_struct *mm)
 		linux_mm_dtor(mm);
 }
 
+static inline bool
+mmget_not_zero(struct mm_struct *mm)
+{
+	return (atomic_inc_not_zero(&mm->mm_users));
+}
+
 static inline void
 mmput(struct mm_struct *mm)
 {


More information about the svn-src-head mailing list