smbd: Introduce metadata_fsp()
commit8391f3dce37e808cc07f723cd990ad08c887a12f
authorVolker Lendecke <vl@samba.org>
Fri, 11 Feb 2022 08:45:30 +0000 (11 09:45 +0100)
committerJule Anger <janger@samba.org>
Tue, 6 Sep 2022 06:32:13 +0000 (6 06:32 +0000)
tree828631fc9993f6c96a5b8e578da3b8cf2f3688ba
parent0acf72bf2f35e9f06ba36a565e49820a316fdf11
smbd: Introduce metadata_fsp()

Centralize the pattern

if (fsp->base_fsp != NULL) {
fsp = fsp->base_fsp;
}

with a descriptive name.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(backported from commit ac58b0b942cd73210100ee346816a0cf23900716)
[slow@samba.org: only backport the function, skip all updated callers]
source3/smbd/files.c
source3/smbd/proto.h