Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1036085pxb; Wed, 6 Apr 2022 07:13:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwusTDP9829RRomDEgpfcOYvbhVQQoJD7JWYhp1BAdiFShFuLmQn3F00AtSsJUDzo7q9yR+ X-Received: by 2002:a17:90b:3508:b0:1c6:e4f9:538b with SMTP id ls8-20020a17090b350800b001c6e4f9538bmr10387146pjb.158.1649254437870; Wed, 06 Apr 2022 07:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649254437; cv=none; d=google.com; s=arc-20160816; b=e+pNzRYj0gc62KqeRJloUulFg11/8EVoc5yKm1j3fHi42v7iCYIsOV+Q0OZ49Pqe8f BQPZkTuxZDDghBIdaFfjGjfXdwk78pRdnOStyeCKtKf2yrr08hpyEGlh1+yUOAKKLajc JX8wUzL0Ir4Cbdt+RxoZLxKoT1cQu1mGMVBqJOUvdXbOuOH6tj7gIKmHiVOBFnqX/46y UzmnwZniWUt/0FSog9BJvnuXJAO7cK/BeiN7VDghUqdNyrP9zuYKsFuaOPlXDV2R6Ygm sP9Ps+rHof82svAS92N2SzBBv9drVybPXMittKBFh+lN0abq6i0tsI9+mVvqdrRCzoPc OeyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=1UzahRT/jAdy94WaPDXPKOhq6HBd1HpzSCP/Atqn2XQ=; b=wU6SXHCM6tOnA/nLc/xDgA5yiXXV3ebSsnzKqSNZIX27NdPfK/+N1c+iIAcCpzNos6 F9vcO9oI51D0kHUZEJ2exzOF76agoEJIL/CcYd7lv/xUADZlPA7ULEb1Rx3dy5oSMVYY frxDaSAijFwc488g32frzpDP4SL2kZmZGDI0oSWdKU8tWtl2/bqB0hcrSEVrFlHzW+gC 74Gt1c5rQBnHUg2I1+99vqXtAYR15iB/jY4NRf9vFgUgXBlHAQxKm0dGpYZa51Xq8UiB QoRcwOABlOz93c6CixjoYCp9bbsYkhL4w2pvfmqJRzHL9FH0pMDb3h4xp0jE9eq0+PP0 fkZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s17-20020a056a00179100b004fa3a8e005csi17250683pfg.275.2022.04.06.07.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:13:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53137273357; Wed, 6 Apr 2022 04:59:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240554AbiDFKOJ (ORCPT + 99 others); Wed, 6 Apr 2022 06:14:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343518AbiDFKNk (ORCPT ); Wed, 6 Apr 2022 06:13:40 -0400 Received: from out199-17.us.a.mail.aliyun.com (out199-17.us.a.mail.aliyun.com [47.90.199.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 912171CFF92 for ; Tue, 5 Apr 2022 19:47:22 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R521e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V9JnNKo_1649213237; Received: from 30.225.24.86(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0V9JnNKo_1649213237) by smtp.aliyun-inc.com(127.0.0.1); Wed, 06 Apr 2022 10:47:18 +0800 Message-ID: <74e81f65-171c-804a-a8ca-fa5452c5ad77@linux.alibaba.com> Date: Wed, 6 Apr 2022 10:47:17 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [Linux-cachefs] [PATCH] fscache: Use wrapper fscache_set_cache_state() directly when relinquishing Content-Language: en-US To: Yue Hu , dhowells@redhat.com, linux-cachefs@redhat.com Cc: zhangwen@coolpad.com, linux-kernel@vger.kernel.org, zbestahu@163.com, zbestahu@gmail.com References: <20220401063643.7340-1-huyue2@coolpad.com> From: JeffleXu In-Reply-To: <20220401063643.7340-1-huyue2@coolpad.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 -- Thanks, Jeffle