Samuel Thibault, le lun. 08 mars 2021 22:35:21 +0100, a ecrit: > Samuel Thibault, le lun. 08 mars 2021 20:51:51 +0100, a ecrit: > > Damien Zammit, le lun. 08 mars 2021 13:15:05 +1100, a ecrit: > > > [PATCH 1/2] pci-arbiter: Fix brokenness > > > > > > This patch does not include mustbedir option because I believe there > > > is already logic that detects if it is looking up a directory, > > > by checking the entry->dir != 0. > > > > Translators then have to implement it in netfs_attempt_lookup: when > > the name ends with a slash, they have to check that the looked up node > > really is a directory. See libdiskfs' diskfs_S_dir_lookup: when it > > sees a trailing /, it notes mustbedir=1, which is later on checked: > > Ah, but libnetfs already implements it in netfs_S_dir_lookup, my bad. > > So we don't need to re-implement it in libnetfs users, sorry.
Reading netfs_S_dir_lookup, it does seem it already separates out path components, so that netfs_attempt_lookup wouldn't ever be passed any '/' in the name. I guess you did see '/' characters coming it, but apparently that's not supposed to happen, so it'd mean some oddity somewhere else that we'd have to fix, rather in each and every libnetfs-based translator. Samuel
