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 <asha...@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) { _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"