Upper dentry inode does not have data. So return lower dentry if upper is only a metadata copy. Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx> --- fs/overlayfs/super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 32e3d4b..4cf1f98 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -101,10 +101,15 @@ static struct dentry *ovl_d_real(struct dentry *dentry, err = ovl_check_append_only(d_inode(real), open_flags); if (err) return ERR_PTR(err); + + if (ovl_dentry_check_upperdata(dentry) && + !ovl_test_flag(OVL_UPPERDATA, d_inode(dentry))) + goto lower; } return real; } +lower: real = ovl_dentry_lower(dentry); if (!real) goto bug; -- 2.5.5 -- 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