linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Barrat <fbarrat@linux.ibm.com>
To: Laurent Dufour <ldufour@linux.ibm.com>,
	ajd@linux.ibm.com, arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	clombard@linux.ibm.com
Subject: Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly
Date: Thu, 11 Mar 2021 08:46:25 +0100	[thread overview]
Message-ID: <8daa454c-b2fd-d914-b170-62b6665e82d8@linux.ibm.com> (raw)
In-Reply-To: <20210310174405.51044-1-ldufour@linux.ibm.com>



On 10/03/2021 18:44, Laurent Dufour wrote:
> 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 <ldufour@linux.ibm.com>
> ---


Thanks!
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>



>   drivers/misc/cxl/fault.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> 

  reply	other threads:[~2021-03-11  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 17:44 [PATCH] cxl: don't manipulate the mm.mm_users field directly Laurent Dufour
2021-03-11  7:46 ` Frederic Barrat [this message]
2021-03-12  2:18 ` Andrew Donnellan
2021-03-31  1:09 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8daa454c-b2fd-d914-b170-62b6665e82d8@linux.ibm.com \
    --to=fbarrat@linux.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=clombard@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).