Skip to contentSkip to conversation

hfsplus: remove dev_err message "xattr exists yet"

PATCH In review Colin Ian King 2 participants 2 messages Mar 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hfsplus: remove dev_err message "xattr exists yet"

While exercising hfsplus with stress-ng with xattr tests the kernel log was spammed with many "xattr exists yet" messages. The error EOPNOTSUPP is returned, so the need to emit these error messages is not necessary; removing them reduces kernel error spamming.

---
 fs/hfsplus/xattr.c | 2 --
 1 file changed, 2 deletions(-)
fs/hfsplus/xattr.c +0 -2
index 9c9ff6b8c6f7..57101524fff4 100644
@@ -288,7 +288,6 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
 
 	if (!strcmp_xattr_finder_info(name)) {
 		if (flags & XATTR_CREATE) {
-			pr_err("xattr exists yet\n");
 			err = -EOPNOTSUPP;
 			goto end_setxattr;
 		}
@@ -335,7 +334,6 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
 
 	if (hfsplus_attr_exists(inode, name)) {
 		if (flags & XATTR_CREATE) {
-			pr_err("xattr exists yet\n");
 			err = -EOPNOTSUPP;
 			goto end_setxattr;
 		}
Signature · 1 line
2.39.2
#1 lore raw
Quoted 4 lines · Colin Ian King

While exercising hfsplus with stress-ng with xattr tests the kernel log was spammed with many "xattr exists yet" messages. The error EOPNOTSUPP is returned, so the need to emit these error messages is not necessary; removing them reduces kernel error spamming.

Isn't that the wrong errno though? EOPNOTSUPP isn't listed as an errno in the fsetxattr manpage. ENOTSUP should be used for "xattrs are not supported". But this condition looks like EEXIST to me.

Quoted 29 lines
---
 fs/hfsplus/xattr.c | 2 --
 1 file changed, 2 deletions(-)
fs/hfsplus/xattr.c +0 -2
index 9c9ff6b8c6f7..57101524fff4 100644
@@ -288,7 +288,6 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
 
 	if (!strcmp_xattr_finder_info(name)) {
 		if (flags & XATTR_CREATE) {
-			pr_err("xattr exists yet\n");
 			err = -EOPNOTSUPP;
 			goto end_setxattr;
 		}
@@ -335,7 +334,6 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
 
 	if (hfsplus_attr_exists(inode, name)) {
 		if (flags & XATTR_CREATE) {
-			pr_err("xattr exists yet\n");
 			err = -EOPNOTSUPP;
 			goto end_setxattr;
 		}
Signature · 1 line
2.39.2