提交 4a99f3c8 编写于 作者: A Amir Goldstein 提交者: Miklos Szeredi

ovl: do not set overlay.opaque on non-dir create

The optimization for opaque dir create was wrongly being applied
also to non-dir create.

Fixes: 97c684cc ("ovl: create directories inside merged parent opaque")
Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10
上级 b0990fbb
...@@ -210,7 +210,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode, ...@@ -210,7 +210,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode,
if (err) if (err)
goto out_dput; goto out_dput;
if (ovl_type_merge(dentry->d_parent)) { if (ovl_type_merge(dentry->d_parent) && d_is_dir(newdentry)) {
/* Setting opaque here is just an optimization, allow to fail */ /* Setting opaque here is just an optimization, allow to fail */
ovl_set_opaque(dentry, newdentry); ovl_set_opaque(dentry, newdentry);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册