Hello, Donjuanplatinum, le dim. 13 sept. 2026 13:48:16 +0800, a ecrit: > Samuel Thibault <[email protected]> writes: > > Donjuanplatinum, le mar. 01 sept. 2026 10:45:06 +0800, a ecrit: > >> > >> In incubator libfuse/master branch ,src/netfs.c lines 1436-1452: > >> > >> > >> /* using the inode based api */ > >> if(! strcmp(name, ".")) > >> inode = fuse_get_inode(handle->parent->path); > >> > >> else if(handle->parent->parent && ! strcmp(name, "..")) > >> inode = fuse_get_inode(handle->parent->parent->path); > >> > >> if(! stat) > >> { > >> DEBUG("critical", "use_ino flag set, but stat ptr not available.\n"); > >> inode = 0; > >> } > >> > >> else > >> inode = stat->st_ino; > >> > >> The "." and ".." cases might to be overridden by the handling of the > >> stat argument. > >> > >> In either cases, the `inode` will be overridden by 0 or stat->st_ino. > > > > It looks odd indeed, perhaps it just lacks an "else" before if (!stat) > > Thanks! I have attached the small patch. I guess the "." and ".." branch > are fallback logic to assign the inode.
Mmm, we'd rather make sure not to be guessing. Your change makes the code always use the given stat for "." and "..", possibly that's wrong, and thus why the code was special-casing "." and "..". You'd need to to put some prints there and really test the situation to be sure what is correct. Samuel
