Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp269325rwn; Wed, 14 Sep 2022 20:38:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR7JvWdbowAV1vpMCRiJ8GP6GhUpYVeDrDvMGWYeeEjh5sOB7WYMUSyho0k2Gj+hKEugDTWy X-Received: by 2002:a63:4425:0:b0:439:4529:1a57 with SMTP id r37-20020a634425000000b0043945291a57mr9195905pga.558.1663213089699; Wed, 14 Sep 2022 20:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663213089; cv=none; d=google.com; s=arc-20160816; b=WQkdFks7ws1igT0KAEshbwrT9pgLmIWHkyPVl1nhLVwewJD/2pu8b0/RHocts1HEC4 1QrZXMHrGHPIMG/RA6NxwTpjIeD759kWY48wLAOPPwtqfGn451nvwaH8GeSB8NrlCWN0 dl/5FkQVxfcn1T+hBn/BSvQYPEGHRvLdB9J57qsbAaKTNsYPXDsNMbMq6mKf0L5udAgp Ir16kqPbPwudzsM7IcZ4SsR38y5CjPtwdzqLiHjo053ueZEBmOpBPDYph6+IQ5YJSJHw WN2bxJsDCUZYkXG67iQzo6BNXr5abocOS9Igc71nyhUsPlQXe99p0J1yxtulHrVEigKj nMcQ== 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:to:content-language:subject:user-agent:mime-version:date :message-id; bh=DklVAfcGXlD/F+XNTBsXR9H72MIgikYoGdHaJ45VRS0=; b=SdE67YqsdY8kK/Ne64qq5GJ9nnABPlt8tbkN00GFf70RuMS+LSaJWdT0Mvlk8elOsF 9O8EbxlZJitvxLxynWRKlXhRWyQf+js1XuSVgYWxNg+8tlC9qGraRwqpjcovqVPLh9z7 9Rg4O8kg5CkLWppZX74UVtG9dI6R+XAxpkQgRlOO4qf38A/u+PTzjnhx4riqATPEKzE8 mXffEqXVp+wCyr1pGop9hXRHCEqaJlLrNKnPSlSikocBsRR4hIyErwDEKepULFYKwe3w 60vO50faopNw6JyIfnu41bVqwfKFC4I4jMhbDQNjIFBpbgTRzp9FxRLRBh3Nx3S4k7Lr EhjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf10-20020a17090b1d8a00b00202f490e522si8458599pjb.39.2022.09.14.20.37.57; Wed, 14 Sep 2022 20:38:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbiIODaA (ORCPT + 99 others); Wed, 14 Sep 2022 23:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiIOD35 (ORCPT ); Wed, 14 Sep 2022 23:29:57 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D685B24BFA; Wed, 14 Sep 2022 20:29:54 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VPqzoJh_1663212590; Received: from 30.221.129.91(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VPqzoJh_1663212590) by smtp.aliyun-inc.com; Thu, 15 Sep 2022 11:29:52 +0800 Message-ID: Date: Thu, 15 Sep 2022 11:29:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH V3 4/6] erofs: introduce fscache-based domain Content-Language: en-US To: Jia Zhu , linux-erofs@lists.ozlabs.org, xiang@kernel.org, chao@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com, huyue2@coolpad.com References: <20220914105041.42970-1-zhujia.zj@bytedance.com> <20220914105041.42970-5-zhujia.zj@bytedance.com> From: JeffleXu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 9/14/22 9:21 PM, Gao Xiang wrote: >> @@ -518,7 +614,13 @@ void erofs_fscache_unregister_fs(struct super_block *sb) >> struct erofs_sb_info *sbi = EROFS_SB(sb); >> >> erofs_fscache_unregister_cookie(sbi->s_fscache); >> - fscache_relinquish_volume(sbi->volume, NULL, false); >> sbi->s_fscache = NULL; >> + >> + if (sbi->domain) >> + erofs_fscache_domain_put(sbi->domain); >> + else >> + fscache_relinquish_volume(sbi->volume, NULL, false); >> + > > How about using one helper and pass in sb directly instead? > Then this helper has only one caller... -- Thanks, Jingbo