[PATCH] ubifs: Change log level in ubifs_xattr_get

rockdotlee at gmail.com rockdotlee at gmail.com
Wed Jan 10 02:05:41 PST 2018


From: Rock Lee <rockdotlee at gmail.com>

Just print warning message when xattr value size is bigger than the
buffer size. There is a situation that other modules, like overlayfs,
try to get xattr value with a small buffer, if they get -ERANGE, they
will try again with the proper buffer size. No need to report a error
message, warning message is enough.

Signed-off-by: Rock Lee <rockdotlee at gmail.com>
---
 fs/ubifs/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 5ddc89d..bc20530 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -381,7 +381,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
 	if (buf) {
 		/* If @buf is %NULL we are supposed to return the length */
 		if (ui->data_len > size) {
-			ubifs_err(c, "buffer size %zd, xattr len %d",
+			ubifs_warn(c, "buffer size %zd, xattr len %d",
 				  size, ui->data_len);
 			err = -ERANGE;
 			goto out_iput;
-- 
1.9.1




More information about the linux-mtd mailing list