From: JeffleXu <jefflexu@linux.alibaba.com>
To: Jia Zhu <zhujia.zj@bytedance.com>, linux-erofs@lists.ozlabs.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
yinxin.x@bytedance.com
Subject: Re: [PATCH V5 5/6] erofs: Support sharing cookies in the same domain
Date: Fri, 16 Sep 2022 17:29:17 +0800 [thread overview]
Message-ID: <1b1222b8-4511-dfd4-bbd2-f354dc2cc5a9@linux.alibaba.com> (raw)
In-Reply-To: <20220916085940.89392-6-zhujia.zj@bytedance.com>
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 <jefflexu@linux.alibaba.com>
--
Thanks,
Jingbo
next prev parent reply other threads:[~2022-09-16 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 8:59 [PATCH V5 0/6] Introduce erofs shared domain Jia Zhu
2022-09-16 8:59 ` [PATCH V5 1/6] erofs: use kill_anon_super() to kill super in fscache mode Jia Zhu
2022-09-16 8:59 ` [PATCH V5 2/6] erofs: code clean up for fscache Jia Zhu
2022-09-16 8:59 ` [PATCH V5 3/6] erofs: introduce fscache-based domain Jia Zhu
2022-09-16 8:59 ` [PATCH V5 4/6] erofs: introduce a pseudo mnt to manage shared cookies Jia Zhu
2022-09-16 8:59 ` [PATCH V5 5/6] erofs: Support sharing cookies in the same domain Jia Zhu
2022-09-16 9:29 ` JeffleXu [this message]
2022-09-16 8:59 ` [PATCH V5 6/6] erofs: introduce 'domain_id' mount option Jia Zhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b1222b8-4511-dfd4-bbd2-f354dc2cc5a9@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yinxin.x@bytedance.com \
--cc=zhujia.zj@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).