diff options
author | Laurent Dufour <ldufour@linux.ibm.com> | 2021-03-10 18:44:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 08:26:30 +0100 |
commit | 615d2ef05a97be05c12cbb50f5fce0b8e094d66c (patch) | |
tree | e85421d003b2b55928fa8a37a0391905d6e093ac /drivers/misc | |
parent | 0ea43c23d4904d6a6e6b2b12a9da12b33ee0da1b (diff) |
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')
-rw-r--r-- | drivers/misc/cxl/fault.c | 2 |
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; |