Commit 2c3d7358 authored by Vivek Goyal's avatar Vivek Goyal Committed by Miklos Szeredi

ovl: Do not expose metacopy only dentry from d_real()

Metacopy dentry/inode is internal to overlay and is never exposed outside
of it.  Exception is metacopy upper file used for fsync().  Modify d_real()
to look for dentries/inode which have data, but also allow matching upper
inode without data for the fsync case.
Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 8c444d2a
......@@ -95,10 +95,13 @@ static struct dentry *ovl_d_real(struct dentry *dentry,
}
real = ovl_dentry_upper(dentry);
if (real && (!inode || inode == d_inode(real)))
if (real && (inode == d_inode(real)))
return real;
real = ovl_dentry_lower(dentry);
if (real && !inode && ovl_has_upperdata(d_inode(dentry)))
return real;
real = ovl_dentry_lowerdata(dentry);
if (!real)
goto bug;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment