svn commit: r357436 - stable/11/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Feb 3 11:00:25 UTC 2020
Author: hselasky
Date: Mon Feb 3 11:00:24 2020
New Revision: 357436
URL: https://svnweb.freebsd.org/changeset/base/357436
Log:
MFC r357077:
Implement mmget_not_zero() in the LinuxKPI.
Submitted by: Austin Shafer <ashafer at badland.io>
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/compat/linuxkpi/common/include/linux/mm_types.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linuxkpi/common/include/linux/mm_types.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/mm_types.h Mon Feb 3 10:59:27 2020 (r357435)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/mm_types.h Mon Feb 3 11:00:24 2020 (r357436)
@@ -55,6 +55,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-stable-11
mailing list