From: Volker Lendecke Date: Wed, 9 Oct 2024 09:59:58 +0000 (+0200) Subject: vfs: Simplify streams_xattr_openat() X-Git-Tag: tdb-1.4.13~543 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea597019aad2fb8d34f3766741a4c2aee3388801;p=thirdparty%2Fsamba.git vfs: Simplify streams_xattr_openat() Don't go via NTSTATUS in error handling Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index bfa5113a530..f422fae0a1f 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -316,7 +316,6 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, files_struct *fsp, const struct vfs_open_how *how) { - NTSTATUS status; struct streams_xattr_config *config = NULL; struct stream_io *sio = NULL; struct ea_struct ea; @@ -360,11 +359,8 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle, ret = get_ea_value_fsp(talloc_tos(), fsp->base_fsp, xattr_name, &ea); if (ret != 0) { DBG_DEBUG("get_ea_value_fsp returned %s\n", strerror(ret)); - status = map_nt_error_from_unix(ret); - } - if (!NT_STATUS_IS_OK(status)) { - if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { + if (ret != ENOATTR) { /* * The base file is not there. This is an error even if * we got O_CREAT, the higher levels should have created