If we unlink an opened file in a readonly branch, then we create a whiteout.
But then if if ftruncate it, we copyup a zero-length file. So we have to
delete the whiteout.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
/* get updated lower_dentry/inode after copyup */
lower_dentry = unionfs_lower_dentry(dentry);
lower_inode = unionfs_lower_inode(inode);
+ /*
+ * check for whiteouts in writeable branch, and remove them
+ * if necessary.
+ */
+ if (lower_dentry) {
+ err = check_unlink_whiteout(dentry, lower_dentry,
+ bindex);
+ if (err > 0) /* ignore if whiteout found and removed */
+ err = 0;
+ }
}
/*