A ~ is not a guarantee in an alias, so this method cannot be used.
How about a small change to how the dcache works? Add a linked element
to the dentry structure. Then for vfat longname/alias pairs, the
two entries would be added to the dcache. The longname would be used
as the normal dentry, and the shortname would set its linked element
to point to the longname dentry. In lookup_dentry, the linked element
would be followed to get the base dentry, so only the longname dentry
would ever be passed into calls like vfat_lookup. This probably would
complicate shrinking of the dcache, so it might not be an acceptable
solution.
- Gordon