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; + } err = -ENOMEM; override_cred = prepare_creds(); @@ -376,7 +383,8 @@ static int ovl_do_remove(struct dentry * ovl_dentry_version_inc(dentry->d_parent); } - if (type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry)) + if ((type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry)) + && ovl_dentry_lower(dentry)) err = ovl_whiteout(upperdir, dentry); /* @@ -554,7 +562,8 @@ static int ovl_rename(struct inode *oldd goto out_dput; } - if (old_type != OVL_PATH_UPPER || old_opaque) + if ((old_type != OVL_PATH_UPPER || old_opaque) + && ovl_dentry_lower(old)) err = ovl_whiteout(old_upperdir, old); if (is_dir && old_opaque && !new_opaque) ovl_remove_opaque(olddentry);