ovl: Do d_type check only if work dir creation was successful 76/307876/1
authorVivek Goyal <vgoyal@redhat.com>
Fri, 20 May 2016 13:04:26 +0000 (09:04 -0400)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 14 Mar 2024 02:20:55 +0000 (11:20 +0900)
commit2cc383bdd20f667aad43af804ee9f6e9bf17c4cb
treec1cce206568c897156f8eb7739dc2878badbfc6b
parent2a8fc961ac71030e9482ff0f2f013b0c92d4e647
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>
[sw0312.kim: cherry-pick linux-4.4.y commit 0f9a6d88cd9f to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If7e17d5c56d0fe36762795d582971253ca7118bb
fs/overlayfs/super.c