Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 2020 10:59:27 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r357435 - stable/12/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202002031059.013AxRYq054002@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002031059.013AxRYq054002>