From: Tejun Heo <tj@kernel.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
muchun.song@linux.dev
Subject: Re: [PATCH] kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR
Date: Mon, 22 May 2023 09:08:47 -1000 [thread overview]
Message-ID: <ZGu9v3OA0wkhff7g@slm.duckdns.org> (raw)
In-Reply-To: <20230516034536.25548-1-songmuchun@bytedance.com>
On Tue, May 16, 2023 at 11:45:36AM +0800, Muchun Song wrote:
> @@ -655,7 +660,7 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,
> return kn;
>
> err_out3:
> - idr_remove(&root->ino_idr, (u32)kernfs_ino(kn));
> + kernfs_idr_remove(root, kn);
Good catch but I'd just open code the locking here.
Thanks.
--
tejun
next prev parent reply other threads:[~2023-05-22 19:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 3:45 Muchun Song
2023-05-22 19:08 ` Tejun Heo [this message]
2023-05-23 2:17 ` Muchun Song
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=ZGu9v3OA0wkhff7g@slm.duckdns.org \
--to=tj@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muchun.song@linux.dev \
--cc=songmuchun@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
all inboxes | Powered by JetHome®