mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Linux-cachefs] [PATCH] fscache: Use wrapper fscache_set_cache_state() directly when relinquishing
       [not found] <20220401063643.7340-1-huyue2@coolpad.com>
@ 2022-04-06  2:47 ` JeffleXu
  0 siblings, 0 replies; only message in thread
From: JeffleXu @ 2022-04-06  2:47 UTC (permalink / raw)
  To: Yue Hu, dhowells, linux-cachefs
  Cc: zhangwen, linux-kernel, zbestahu, zbestahu



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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-06 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220401063643.7340-1-huyue2@coolpad.com>
2022-04-06  2:47 ` [Linux-cachefs] [PATCH] fscache: Use wrapper fscache_set_cache_state() directly when relinquishing JeffleXu

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®