Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp399949rwn; Wed, 14 Sep 2022 23:48:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6H7pkt26GZtj4p0M/zvlKxJsxT2KlJo5T67BsO+ywZiC+9zaCYkWnB6lC8GB+qFT9PzjUz X-Received: by 2002:a63:dd07:0:b0:438:c9c9:7fcc with SMTP id t7-20020a63dd07000000b00438c9c97fccmr19517468pgg.161.1663224494884; Wed, 14 Sep 2022 23:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663224494; cv=none; d=google.com; s=arc-20160816; b=DNioWgBGybecXJShf5gojO2dLZmkkKRHwQvwTSgbHcC0OoDTbs2FQcRSFg5uNWIrUu R24FAV003uGLWMSydLa3Fpu2i4PsVEukNR0ytpVX1hPOWuhIBwvFnaRR4qi8bSyK5PQk QHzHFIfClPzizK9CB1kfEBcPlSTxMLGAM9YmXjTg9sKIY7r/1GEtpdLKg8HN+76yN54M 3tdF74TXuuu0rwhmjcF2gJXTqSidGiqXMVnYpSlgyljdmL/uNBk78FmtFQh2jgm7jnBP ohI4+YvJS4PEd1M+ebNt6F9DhVbYpyaGyT/TMYoMeDNGOCPBQIp9tcaI3YtXX1Q54Po5 0cSg== 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=2kflLY02emGKaNSfZibAuA6ttTqcUAKB+cEu00cOrHA=; b=ZpQ0svvxEE8KTsjj20yIdD9qMASkfWnyiL+NkLGJtVI/LtmMFxguQxhVyaD2uiz1s4 fkqxINBnuMONxxR5/5agtSoi5CZC6nuBGHJRPANNifoAJclpDTdVRwVGiVqrD+z07bdb wQ7iXTf8HdwoNJfBVnoMt/sOg1JRJ0N+CkMuLjuy8Ls9bF7wECihYAEslxKp+aCje2ir lFOQox7TD4vXNeTG/04QPI7YalTH8ryJoVhYV7hLz7RWSJf/3RjHmOzEtYHfET3fNvK2 5tmSGCQjnyR9rIuaLHjIEZJBQ6EuyycBEkvR4P5WzUx9hlPxDNve7/yPF3TcHwMjLXvp InKA== 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 w12-20020a170902a70c00b00174e8a089b6si3029364plq.559.2022.09.14.23.48.03; Wed, 14 Sep 2022 23:48:14 -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 S229911AbiIOGqW (ORCPT + 99 others); Thu, 15 Sep 2022 02:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbiIOGp4 (ORCPT ); Thu, 15 Sep 2022 02:45:56 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E13E2613; Wed, 14 Sep 2022 23:45:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R661e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VPrYcVl_1663224302; Received: from 30.221.129.91(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VPrYcVl_1663224302) by smtp.aliyun-inc.com; Thu, 15 Sep 2022 14:45:03 +0800 Message-ID: Date: Thu, 15 Sep 2022 14:45:02 +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 2/6] erofs: code clean up for fscache Content-Language: en-US To: Jia Zhu , linux-erofs@lists.ozlabs.org, xiang@kernel.org, chao@kernel.org Cc: 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-3-zhujia.zj@bytedance.com> From: JeffleXu In-Reply-To: <20220914105041.42970-3-zhujia.zj@bytedance.com> 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 6:50 PM, Jia Zhu wrote: > > @@ -485,13 +481,13 @@ void erofs_fscache_unregister_cookie(struct erofs_fscache **fscache) > ctx->inode = NULL; - ctx->cookie = NULL; - ctx->inode = NULL; I think the above two lines can also be deleted. After all @ctx will be freed soon. > > kfree(ctx); > - *fscache = NULL; > } > -- Thanks, Jingbo