linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] hfsplus: remove dev_err message "xattr exists yet"
@ 2024-03-06 12:40 Colin Ian King
  2024-03-06 15:00 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-03-06 12:40 UTC (permalink / raw)
  To: Wedson Almeida Filho, Christian Brauner, linux-fsdevel
  Cc: kernel-janitors, linux-kernel

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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/hfsplus/xattr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
index 9c9ff6b8c6f7..57101524fff4 100644
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -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;
 		}
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] hfsplus: remove dev_err message "xattr exists yet"
  2024-03-06 12:40 [PATCH][next] hfsplus: remove dev_err message "xattr exists yet" Colin Ian King
@ 2024-03-06 15:00 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2024-03-06 15:00 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Wedson Almeida Filho, Christian Brauner, linux-fsdevel,
	kernel-janitors, linux-kernel

On Wed, Mar 06, 2024 at 12:40:54PM +0000, Colin Ian King wrote:
> 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.

> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/hfsplus/xattr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
> index 9c9ff6b8c6f7..57101524fff4 100644
> --- a/fs/hfsplus/xattr.c
> +++ b/fs/hfsplus/xattr.c
> @@ -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;
>  		}
> -- 
> 2.39.2
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-06 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 12:40 [PATCH][next] hfsplus: remove dev_err message "xattr exists yet" Colin Ian King
2024-03-06 15:00 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).