On Fri Nov 22 16:19:13 2024 +0000, Jinoh Kang wrote:
Instead of resolving the full realpath, we can check if:
- their dirnames resolve to different dev/ino, which means they belong
to a different directory, or 2. they have different basenames (even if they belong to the same directory). Granted, there might be an edge case regarding symlinks and/or mount points, but I suspect the existing code isn't fully correct in this regard either, so I guess it's fine.
Is that worth the complication in the code? We'll still need two syscalls, and the kernel will still need to traverse the same amount of symlinks to reach the dirnames.