From d4d064de19401c916a70e9be72498727e2976cae Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Wed, 12 Jun 2024 16:40:59 -0700 Subject: [PATCH] fix: remove unnecessary no xattr definitions --- backend/scoutfs/scoutfs.go | 6 ------ backend/scoutfs/with_enodata.go | 24 ------------------------ backend/scoutfs/without_enodata.go | 24 ------------------------ 3 files changed, 54 deletions(-) delete mode 100644 backend/scoutfs/with_enodata.go delete mode 100644 backend/scoutfs/without_enodata.go diff --git a/backend/scoutfs/scoutfs.go b/backend/scoutfs/scoutfs.go index da569a40..4c52e92a 100644 --- a/backend/scoutfs/scoutfs.go +++ b/backend/scoutfs/scoutfs.go @@ -969,15 +969,9 @@ func fSetNewGlobalFlags(objname string, flags uint64) error { } func isNoAttr(err error) bool { - if err == nil { - return false - } xerr, ok := err.(*xattr.Error) if ok && xerr.Err == xattr.ENOATTR { return true } - if err == errNoData { - return true - } return false } diff --git a/backend/scoutfs/with_enodata.go b/backend/scoutfs/with_enodata.go deleted file mode 100644 index 6d41d1df..00000000 --- a/backend/scoutfs/with_enodata.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2024 Versity Software -// This file is licensed under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -//go:build !freebsd && !openbsd && !netbsd -// +build !freebsd,!openbsd,!netbsd - -package scoutfs - -import "syscall" - -var ( - errNoData = syscall.ENODATA -) diff --git a/backend/scoutfs/without_enodata.go b/backend/scoutfs/without_enodata.go deleted file mode 100644 index c621fc60..00000000 --- a/backend/scoutfs/without_enodata.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2024 Versity Software -// This file is licensed under the Apache License, Version 2.0 -// (the "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -//go:build freebsd || openbsd || netbsd -// +build freebsd openbsd netbsd - -package scoutfs - -import "syscall" - -var ( - errNoData = syscall.ENOATTR -)