smbd: optimisation using pathref fd to open real fd if possible
commit5770cdd7635a018817418f58bd37268aedebd6a9
authorRalph Boehme <slow@samba.org>
Mon, 12 Oct 2020 13:28:08 +0000 (12 15:28 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:31 +0000 (16 09:08 +0000)
tree67c8da762e3c44757896a5b98abd7fc196e139e9
parent37003ec709041d523bec56ee17034cc6f3d26a09
smbd: optimisation using pathref fd to open real fd if possible

This is an optimisation that avoids going through the expensive
non_widelink_open() logic a second time. It depends on a usable /proc/%d/fd/%d
filesystem and this is checked and set as "can_reopen" flag by the VFS in the
openat() function in the fsp.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c