On Sun, Sep 10, 2017 at 10:21 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > On Sun, Sep 10, 2017 at 5:10 PM, Jordi Pujol <jordipujolp@xxxxxxxxx> wrote: >> This error disappears after installing 4.13.1, but other problems have >> arised when unmounting some kind of filesystems. >> > > That is strage, because I see nothing fs related in v4.13..v4.13.1 > which umount problems are you referring to? > >> Maybe it was not an overlayfs error. >> > > Ehm.. maybe, but considering the changes in overlayfs for v4.13 > I cannot rule out that we missed some subtle race with overlay inode > cache that would change behavior. > > Also, I did not test much with lower fs that does not support file handles, > and that is the case in your setup, so there might be a bug hiding there. > Sure enough, testing with squashfs as lower layer found a bug very much like you described. Bug is easy to reproduce by trying to hardlink a lower file. Harder to reproduce with rename, because it requires that dentry of a copied up file is evicted from cache after rename, but that overlay inode is still in cache. You are welcome to try this fix if problem is reproducing for you or verify the simpler hardlink regression. Thanks, Amir. --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -581,8 +581,7 @@ static bool ovl_verify_inode(struct inode *inode, struct dentry *lowerdentry, { struct inode *lowerinode = lowerdentry ? d_inode(lowerdentry) : NULL; - /* Lower (origin) inode must match, even if NULL */ - if (ovl_inode_lower(inode) != lowerinode) + if (lowerdentry && ovl_inode_lower(inode) != lowerinode) return false; -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html