Implement mmget_not_zero() in the LinuxKPI.
Submitted by: Austin Shafer <ashafer@badland.io> MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
618b55c2e2
commit
b9a6330da3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357077
@ -57,6 +57,12 @@ mmdrop(struct mm_struct *mm)
|
|||||||
linux_mm_dtor(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
|
static inline void
|
||||||
mmput(struct mm_struct *mm)
|
mmput(struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user