summaryrefslogtreecommitdiff
path: root/drivers/misc/cxl
diff options
context:
space:
mode:
authorLaurent Dufour <ldufour@linux.ibm.com>2021-03-10 20:44:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 10:26:30 +0300
commit615d2ef05a97be05c12cbb50f5fce0b8e094d66c (patch)
treee85421d003b2b55928fa8a37a0391905d6e093ac /drivers/misc/cxl
parent0ea43c23d4904d6a6e6b2b12a9da12b33ee0da1b (diff)
downloadlinux-615d2ef05a97be05c12cbb50f5fce0b8e094d66c.tar.xz
cxl: don't manipulate the mm.mm_users field directly
It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Acked-by: Frederic Barrat <fbarrat@linux.ibm.com> Acked-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com> Link: https://lore.kernel.org/r/20210310174405.51044-1-ldufour@linux.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/cxl')
-rw-r--r--drivers/misc/cxl/fault.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c
index 01153b74334a..60c829113299 100644
--- a/drivers/misc/cxl/fault.c
+++ b/drivers/misc/cxl/fault.c
@@ -200,7 +200,7 @@ static struct mm_struct *get_mem_context(struct cxl_context *ctx)
if (ctx->mm == NULL)
return NULL;
- if (!atomic_inc_not_zero(&ctx->mm->mm_users))
+ if (!mmget_not_zero(ctx->mm))
return NULL;
return ctx->mm;