From 4f977b61e906d0b9f68daa646cb0ff656a3768d2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Mar 2021 13:42:31 -0800 Subject: [PATCH] s3: smbd: Change SMB_VFS_REMOVEXATTR -> SMB_VFS_FREMOVEXATTR. We no longer need pathname based xattr remove. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/trans2.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3adb59e3b46..8449f745ff5 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -792,20 +792,10 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, if (ea_list->ea.value.length == 0) { /* Remove the attribute. */ - if (!fsp->fsp_flags.is_pathref && - fsp_get_io_fd(fsp) != -1) - { - DEBUG(10,("set_ea: deleting ea name %s on " - "file %s by file descriptor.\n", - unix_ea_name, fsp_str_dbg(fsp))); - ret = SMB_VFS_FREMOVEXATTR(fsp, unix_ea_name); - } else { - DEBUG(10,("set_ea: deleting ea name %s on file %s.\n", - unix_ea_name, fsp->fsp_name->base_name)); - ret = SMB_VFS_REMOVEXATTR(conn, - fsp->fsp_name, - unix_ea_name); - } + DBG_DEBUG("deleting ea name %s on " + "file %s by file descriptor.\n", + unix_ea_name, fsp_str_dbg(fsp)); + ret = SMB_VFS_FREMOVEXATTR(fsp, unix_ea_name); #ifdef ENOATTR /* Removing a non existent attribute always succeeds. */ if (ret == -1 && errno == ENOATTR) { -- 2.47.3