Messages in this thread | | | Date | Thu, 18 Nov 2021 06:35:17 -1000 | From | Tejun Heo <> | Subject | Re: [RFC PATCH] kernfs: release kernfs_mutex before the inode allocation |
| |
On Wed, Nov 17, 2021 at 05:55:33PM -0800, Minchan Kim wrote: > > Ah, right, kernfs_node doesn't point back to kernfs_root. I guess it can go > > one of three ways: > > Thanks for the suggestion, Tejun. > > I found kernfs_root and it seems like to return kernfs_root from kernfs_node. > If it's true all the case, we would put the rwsem in kernfs_root and change > would be straightforward. Do you see any problem?
Ah, you're right. I forgot that directory kernfs_node always points to the root so we need at most one walk up the tree to locate kernfs_root. Yeah, that should definitely work.
Thanks.
-- tejun
| |