Jordi Pujol <jordipujolp@xxxxxxxxx> writes: > Hello, > > I have solved this checking if the lower dentry exists when calling > ovl_whiteout in ovl_do_remove and ovl_rename, > also added in ovl_whiteout a check for existance of lower dentry and a debug > message, as it was already planned as a TODO task in the source code. > > by now it works, even the debug message not appears, > > Thanks, > > Jordi Pujol > > Live never ending Tale > GNU/Linux Live forever! > http://livenet.selfip.com > > --- a/fs/overlayfs/dir.c > +++ b/fs/overlayfs/dir.c > @@ -33,7 +33,14 @@ static int ovl_whiteout(struct dentry *u > const struct cred *old_cred; > struct cred *override_cred; > > - /* FIXME: recheck lower dentry to see if whiteout is really needed */ > + err = 0; > + /* recheck lower dentry to see if whiteout is really needed */ > + /* dont consider this an error */ > + if (!ovl_dentry_lower(dentry)) { > + printk(KERN_DEBUG "overlayfs: DEBUG - no lower dentry to whiteout '%s'\n", > + dentry->d_name.name); > + return 0; > + } Okay, thanks for the patch. It doesn't look like the correct fix, however. Even though ovl_dentry_lower() returns NULL, the lower file should normally exist. Please look a the ovl_do_lookup() logic: if oe->opaque is set to true, then oe->lowerdentry will be set to NULL, even when the lower dentry does actually exist. So your patch might cover up the problem that you've been observing (because it won't create the whiteouts in some cases), but it will introduce another bug. Thanks, Miklos -- 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