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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 6f4c32e49298..fa9d0032fd03 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -101,10 +101,14 @@ 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_test_flag(OVL_METACOPY, d_inode(dentry))) + goto lower; } return real; } +lower: real = ovl_dentry_lower(dentry); if (!real) goto bug; -- 2.13.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