From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41CFDC32771 for ; Fri, 16 Sep 2022 02:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbiIPCgC (ORCPT ); Thu, 15 Sep 2022 22:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbiIPCf7 (ORCPT ); Thu, 15 Sep 2022 22:35:59 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F2806D9D1; Thu, 15 Sep 2022 19:35:58 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VPv3AqH_1663295754; Received: from 30.221.130.67(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VPv3AqH_1663295754) by smtp.aliyun-inc.com; Fri, 16 Sep 2022 10:35:55 +0800 Message-ID: <96a96aff-5d16-a2e3-2529-58e154e0f728@linux.alibaba.com> Date: Fri, 16 Sep 2022 10:35:54 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH V4 3/6] erofs: introduce fscache-based domain Content-Language: en-US To: Jia Zhu , linux-erofs@lists.ozlabs.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com References: <20220915124213.25767-1-zhujia.zj@bytedance.com> <20220915124213.25767-4-zhujia.zj@bytedance.com> From: JeffleXu In-Reply-To: <20220915124213.25767-4-zhujia.zj@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/15/22 8:42 PM, Jia Zhu wrote: > > +static void erofs_fscache_domain_put(struct erofs_domain *domain) > +{ > + if (!domain) > + return; > + mutex_lock(&erofs_domain_list_lock); > + if (refcount_dec_and_test(&domain->ref)) { > + list_del(&domain->list); > + fscache_relinquish_volume(domain->volume, NULL, false); > + mutex_unlock(&erofs_domain_list_lock); I think we can mutex_unlock as long as the domain is removed from the list. Otherwise LGTM. Reviewed-by: Jingbo Xu -- Thanks, Jingbo