mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: JeffleXu <jefflexu@linux.alibaba.com>
To: Yue Hu <huyue2@coolpad.com>,
	dhowells@redhat.com, linux-cachefs@redhat.com
Cc: zhangwen@coolpad.com, linux-kernel@vger.kernel.org,
	zbestahu@163.com, zbestahu@gmail.com
Subject: Re: [Linux-cachefs] [PATCH] fscache: Use wrapper fscache_set_cache_state() directly when relinquishing
Date: Wed, 6 Apr 2022 10:47:17 +0800	[thread overview]
Message-ID: <74e81f65-171c-804a-a8ca-fa5452c5ad77@linux.alibaba.com> (raw)
In-Reply-To: <20220401063643.7340-1-huyue2@coolpad.com>



On 4/1/22 2:37 PM, Yue Hu wrote:
> We already have the wrapper function to set cache state.
> 
> Signed-off-by: Yue Hu <huyue2@coolpad.com>
> ---
>  fs/fscache/cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/fscache/cache.c b/fs/fscache/cache.c
> index 2749933852a9..d645f8b302a2 100644
> --- a/fs/fscache/cache.c
> +++ b/fs/fscache/cache.c
> @@ -214,7 +214,7 @@ void fscache_relinquish_cache(struct fscache_cache *cache)
>  
>  	cache->ops = NULL;
>  	cache->cache_priv = NULL;
> -	smp_store_release(&cache->state, FSCACHE_CACHE_IS_NOT_PRESENT);
> +	fscache_set_cache_state(cache, FSCACHE_CACHE_IS_NOT_PRESENT);
>  	fscache_put_cache(cache, where);
>  }
>  EXPORT_SYMBOL(fscache_relinquish_cache);

Looks good to me.
Reviewed-by: Jeffle Xu <jefflexu@linux.alibaba.com>

-- 
Thanks,
Jeffle

           reply	other threads:[~2022-04-06 10:12 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220401063643.7340-1-huyue2@coolpad.com>]

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=74e81f65-171c-804a-a8ca-fa5452c5ad77@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=dhowells@redhat.com \
    --cc=huyue2@coolpad.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zbestahu@163.com \
    --cc=zbestahu@gmail.com \
    --cc=zhangwen@coolpad.com \
    /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

all inboxes | Powered by JetHome®