提交 21765194 编写于 作者: V Vivek Goyal 提交者: Miklos Szeredi

ovl: Do d_type check only if work dir creation was successful

d_type check requires successful creation of workdir as iterates
through work dir and expects work dir to be present in it. If that's
not the case, this check will always return d_type not supported even
if underlying filesystem might be supporting it.

So don't do this check if work dir creation failed in previous step.
Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 942fd803
......@@ -1074,8 +1074,10 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
/*
* Upper should support d_type, else whiteouts are visible.
* Given workdir and upper are on same fs, we can do
* iterate_dir() on workdir.
* iterate_dir() on workdir. This check requires successful
* creation of workdir in previous step.
*/
if (ufs->workdir) {
err = ovl_check_d_type_supported(&workpath);
if (err < 0)
goto out_put_workdir;
......@@ -1086,6 +1088,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
goto out_put_workdir;
}
}
}
err = -ENOMEM;
ufs->lower_mnt = kcalloc(numlower, sizeof(struct vfsmount *), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册