diff options
author | Laurent Dufour <[email protected]> | 2021-03-10 18:44:05 +0100 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2021-03-29 12:52:24 +1100 |
commit | 2d9f69bc5a5a75579b410beb0dc3d313be762c9f (patch) | |
tree | d8d4360072be6a50c46a2e312c0c9ab3c7da028c | |
parent | d943bc742a6aabc578b6b62a713ceedf8bf16623 (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.
Signed-off-by: Laurent Dufour <[email protected]>
Acked-by: Frederic Barrat <[email protected]>
Acked-by: Andrew Donnellan <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-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; |