Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1918979rwn; Fri, 16 Sep 2022 02:56:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5vKj7dfT0Y32cOkL2NsvqdqCxlcdODQBmCgwAoWFCvRJ8/noGzQc4K0IccWy5KduLUlt+j X-Received: by 2002:a17:902:f548:b0:178:44b:4ea9 with SMTP id h8-20020a170902f54800b00178044b4ea9mr3970920plf.77.1663322188168; Fri, 16 Sep 2022 02:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663322188; cv=none; d=google.com; s=arc-20160816; b=tnmbgetrgS1/Q3WvlWBRat0SS05ZJslJIf/hAsx74FMvVMUf2MEwBEP6qgHF+jRZ8/ 0zMlVw9fH9RJP09L0nE0Wgoq+MncpjXeOyQ5qPKGWM6r5hbLE1F0vXB/t+QircIUimmk xEAQD2jNaRZXj40nsS25SWLmLSKLKcS0XXVP5S8YjH+kc3i/luJpd58J+Vh6XgX8HuDt wvblcGyxTNMqWGh5nVnsd/Dj4uRVYsvifcZ56TfMkqQL+xGULwM5dbN1YSOeRYl4iufJ h7c86IJ0pKeto+j8hVAGQK5XsEy05dCb2/LZGiG2LkZjyFM63tp9TEGinZGRQqj3EkPJ oV/Q== 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=7YERlL+rkm+ZYxnQwdp7tqNptEzHw+gzkwdwBswL4xE=; b=AEciW/7dPkfB7hR+c+mZ89RHKD3bTUVhKJYQvF+w5577SNDk0GZAGtYSbhvvDTXA5x 4zmv+J/34iiZH0q77lTorI07jyCKFLEVtcQUc/r2fP7pNnBYHhfZP0EPnrszjir/a2jg 0ctv9gGS3L5Z7wORkzW1GBIDImC9IACeZsKbavTdPVRGulAQTB9ObPJWr1bE8AUOAWAB nx9R7BAcUZ/X91Iyesyc9zHmHSp1S1fYe6izf9CY6WDCJCYPgS0rOU3KwIuqTLelPZAR jEHG4krV4FYaXbMoI0lmylLIxfRmJex9J7nJtlR/3jMyMAXqlBS5eAAVWj0cfVAOpdAE kFLg== 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 y133-20020a62ce8b000000b005283d3bb832si10765479pfg.193.2022.09.16.02.56.16; Fri, 16 Sep 2022 02:56:28 -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 S230088AbiIPJ3Z (ORCPT + 99 others); Fri, 16 Sep 2022 05:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbiIPJ3X (ORCPT ); Fri, 16 Sep 2022 05:29:23 -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 3B4F3A59AA; Fri, 16 Sep 2022 02:29:21 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R931e4;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=5;SR=0;TI=SMTPD_---0VPwiYrC_1663320557; Received: from 30.221.130.67(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VPwiYrC_1663320557) by smtp.aliyun-inc.com; Fri, 16 Sep 2022 17:29:18 +0800 Message-ID: <1b1222b8-4511-dfd4-bbd2-f354dc2cc5a9@linux.alibaba.com> Date: Fri, 16 Sep 2022 17:29:17 +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 V5 5/6] erofs: Support sharing cookies in the same 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: <20220916085940.89392-1-zhujia.zj@bytedance.com> <20220916085940.89392-6-zhujia.zj@bytedance.com> From: JeffleXu In-Reply-To: <20220916085940.89392-6-zhujia.zj@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,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/16/22 4:59 PM, Jia Zhu wrote: > +static > +struct erofs_fscache *erofs_fscache_domain_init_cookie(struct super_block *sb, > + char *name, bool need_inode) > +{ > + int err; > + struct inode *inode; > + struct erofs_fscache *ctx; > + struct erofs_domain *domain = EROFS_SB(sb)->domain; > + > + ctx = erofs_fscache_acquire_cookie(sb, name, need_inode); > + if (IS_ERR(ctx)) > + return ctx; > + > + ctx->name = kstrdup(name, GFP_KERNEL); > + if (!ctx->name) { > + err = -ENOMEM; > + goto out; > + } > + > + inode = new_inode(erofs_pseudo_mnt->mnt_sb); > + if (!inode) { > + kfree(ctx->name); ^ This line can be omitted since erofs_fscache_relinquish_cookie() will be called. > + err = -ENOMEM; > + goto out; > + } > + > + ctx->domain = domain; > + ctx->anon_inode = inode; > + inode->i_private = ctx; > + refcount_inc(&domain->ref); > + return ctx; > +out: > + erofs_fscache_relinquish_cookie(ctx); > + return ERR_PTR(err); > +} Otherwise LGTM. Reviewed-by: Jingbo Xu -- Thanks, Jingbo