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