ovl: Do d_type check only if work dir creation was successful
authorVivek Goyal <vgoyal@redhat.com>
Fri, 20 May 2016 13:04:26 +0000 (09:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Aug 2018 05:23:43 +0000 (07:23 +0200)
commit0f9a6d88cd9f3b16a86639bd652202fe27096b18
treed702450dde970540707d3f776db911185ca85fc3
parentd5e678942de33a5d8545a8b7c825eb93b57be1a9
ovl: Do d_type check only if work dir creation was successful

commit 21765194cecf2e4514ad75244df459f188140a0f upstream.

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: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/super.c