From e166299b186e11376b7cfdb902805e013fc0f598 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Dec 2024 19:37:20 +0100 Subject: [PATCH] lib: Simplify ad_get_internal() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We have metadata_fsp() for this Signed-off-by: Volker Lendecke Reviewed-by: Pavel Filipenský --- source3/lib/adouble.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 264e8f69013..71efa4a6a9f 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -2584,11 +2584,8 @@ static struct adouble *ad_get_internal(TALLOC_CTX *ctx, int mode; if (fsp != NULL) { - if (fsp_is_alternate_stream(fsp)) { - smb_fname = fsp->base_fsp->fsp_name; - } else { - smb_fname = fsp->fsp_name; - } + struct files_struct *meta_fsp = metadata_fsp(fsp); + smb_fname = meta_fsp->fsp_name; } DEBUG(10, ("ad_get(%s) called for %s\n", -- 2.47.3