public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: rockdotlee@gmail.com
To: linux-mtd@lists.infradead.org
Cc: richard@nod.at, dedekind1@gmail.com, adrian.hunter@intel.com,
	Rock Lee <rockdotlee@gmail.com>
Subject: [PATCH] ubifs: Change log level in ubifs_xattr_get
Date: Wed, 10 Jan 2018 05:05:41 -0500	[thread overview]
Message-ID: <1515578741-6612-1-git-send-email-rockdotlee@gmail.com> (raw)

From: Rock Lee <rockdotlee@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@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

             reply	other threads:[~2018-01-10 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 10:05 rockdotlee [this message]
2018-01-10 14:39 ` [PATCH] ubifs: Change log level in ubifs_xattr_get Richard Weinberger
2018-01-11  1:47   ` Rock Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1515578741-6612-1-git-send-email-rockdotlee@gmail.com \
    --to=rockdotlee@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox