hfsplus: remove dev_err messages and fix errno values
Subsystems (3)
PATCH v2 1/1 hfsplus: remove dev_err messages and fix errno values
While exercising hfsplus with stress-ng with xattr tests the kernel log was spammed with many error messages. The need to emit these messages is not necessary, so remove them. Also fix the errno returns, for XATTR_CREATE errors these should be -EEXIST, and for XATTR_REPLACE this should be -ENODATA.
Kudos to Matthew Wilcox for spotting the need for -EEXIST instead of -EOPNOTSUPP.
---
V2: Also remove "cannot replace xattr" message and fix the errno returns
--- fs/hfsplus/xattr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
fs/hfsplus/xattr.c +3 -6
@@ -288,8 +288,7 @@ 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 ; + err = -EEXIST ; goto end_setxattr; } hfs_bnode_read(cat_fd.bnode, &entry, cat_fd.entryoffset,
@@ -335,8 +334,7 @@ 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 ; + err = -EEXIST ; goto end_setxattr; } err =hfsplus_delete_attr (inode, name);
@@ -347,8 +345,7 @@ int __hfsplus_setxattr(struct inode *inode, const char *name, goto end_setxattr; }else {if (flags &XATTR_REPLACE ) { -pr_err ("cannot replace xattr\n" ); - err = -EOPNOTSUPP ; + err = -ENODATA ; goto end_setxattr; } err =hfsplus_create_attr (inode, name, value, size);
Signature · 1 line
2.39.2
Quoted 10 lines · Colin Ian King
While exercising hfsplus with stress-ng with xattr tests the kernel log was spammed with many error messages. The need to emit these messages is not necessary, so remove them. Also fix the errno returns, for
XATTR_CREATEerrors these should be-EEXIST, and forXATTR_REPLACEthis should be-ENODATA.Kudos to Matthew Wilcox for spotting the need for
-EEXISTinstead of-EOPNOTSUPP.[...]
Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc
[1/1] hfsplus: remove dev_err messages and fix errno values
https://git.kernel.org/vfs/vfs/c/41983afe811a