Hello,

Milos Nikic, le jeu. 29 oct. 2026 21:26:39 -0700, a ecrit:
> try_lookup unlocks the directory before fshelp_fetch_root, which locks
> only the translated node again.  Every outcome but ENOENT then goes to
> OUT, which unlocks the directory a second time with diskfs_nput.  A
> thread holding the directory, such as another lookup in it, loses its
> lock, as with any lookup through a translator, e.g. under /dev or
> /servers.
> 
> Release only the directory's reference on those exits.

Ok. I however see that libnetfs's dir-lookup.c is very similar,
we should avoid them diverging too much. In libnetfs, the 'out'
label expects dnp not to be locked, it is undeed unlocked early, by
netfs_attempt_lookup typically. Does libdiskfs really need to keep it
locked while doing "start the translator" etc.?

Conversely, the management of deref-ing newpi may be simpler in
libdiskfs than libnetfs?

Samuel

Reply via email to