Robin Dong: > There are two ways to fix this problem. > First, traverse all alias of inode to find a non-zero-d_count dentry, > this may be inefficient > Second, create a new overlayfs inode and a new overlayfs dentry in > ovl_link, that will make the result of two actions > ("create link" then "mount", or "mount" then "create link") consistent. How about third one (as for the original "two inodes" problem)? - create a table to convert the uppderdir (real) inode number into the overlayfs (virtual) inode number. - using the table, you can get the virtual inum from the real inum. - as long as you have a single real inum (for hardlinks), you will get a single virtual inum. J. R. Okajima -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html