ovl: ovl_obtain_alias(): don't call d_instantiate_anon() for old
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 24 Oct 2019 01:06:45 +0000 (02:06 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 17 Mar 2020 14:04:23 +0000 (15:04 +0100)
commit504f38410a51f513606c3c18c7f6a32c1ca2afb5
treee8a2e54e38b055cb5bf7b5db33834a294b77837e
parentd80172c2d85947efe285693c5cea9c8976f478bf
ovl: ovl_obtain_alias(): don't call d_instantiate_anon() for old

The situation is the same as for __d_obtain_alias() (which is what that
thing is parallel to) - if we find a preexisting alias, we want to grab it,
drop the inode and return the alias we'd found.

The only thing d_instantiate_anon() does compared to that is spurious
security_d_instiate() that has already been done to that dentry with exact
same arguments.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/export.c