On Wed, Jun 14, 2017 at 2:00 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > On Wed, Jun 14, 2017 at 10:26 AM, Amir Goldstein <amir73il@xxxxxxxxx> wrote: >> Introduce ovl_inode_info struct that is embedded in ovl_inode >> and contains a reference to lowerinode and/or upperinode. >> >> Storing the upper/lower real inode in ovl_inode_info replaces >> the method of storing realinode & ISUPPER flag in vfs inode >> i_private field. >> >> This will be used for hashing overlay inodes before copy up. >> >> Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> >> --- > >> +struct inode *ovl_inode_real(struct inode *inode, bool *is_upper) >> +{ >> + struct ovl_inode_info *oi = OVL_I_INFO(inode); >> + struct inode *realinode; >> + >> + realinode = READ_ONCE(oi->__upperinode); >> + if (!realinode) >> + realinode = oi->lowerinode; >> + else if (is_upper) >> + *is_upper = true; > > oops, bug, not setting false (caught by ./run --ov rmdir): > if (is_upper) > *is_upper = !realinode; > Embarrassing. I fixed the bug in a very buggy way and did not notice that it broke my tests... should be: realinode = READ_ONCE(oi->__upperinode); if (is_upper) *is_upper = !!realinode; if (!realinode) realinode = oi->lowerinode; Pushed the ovl-hardlinks branch with the fixed version. -- 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