Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 2020 11:00:24 +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-11@freebsd.org
Subject:   svn commit: r357436 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202002031100.013B0Om7054181@repo.freebsd.org>

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



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