All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Yang <dongsheng081251@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] ubifs: Fix xattr generic handler usage
Date: Wed, 17 Aug 2016 20:06:52 +0800	[thread overview]
Message-ID: <57B4535C.1020201@gmail.com> (raw)
In-Reply-To: <1469994143-13977-1-git-send-email-richard@nod.at>

On 08/01/2016 03:42 AM, Richard Weinberger wrote:
> UBIFS uses full names to work with xattrs, therefore we have to use
> xattr_full_name() to obtain the xattr prefix as string.
>
> Cc: <stable@vger.kernel.org>
> Cc: Andreas Gruenbacher <agruenba@redhat.com>
> Fixes: 2b88fc21ca ("ubifs: Switch to generic xattr handlers")
> Signed-off-by: Richard Weinberger <richard@nod.at>
Tested-by: Dongsheng Yang <dongsheng081251@gmail.com>

It make ubifs passes generic/020 in xfstests.

Yang
> ---
>   fs/ubifs/xattr.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
> index b5fc279..c63710f 100644
> --- a/fs/ubifs/xattr.c
> +++ b/fs/ubifs/xattr.c
> @@ -575,7 +575,8 @@ static int ubifs_xattr_get(const struct xattr_handler *handler,
>   	dbg_gen("xattr '%s', ino %lu ('%pd'), buf size %zd", name,
>   		inode->i_ino, dentry, size);
>   
> -	return  __ubifs_getxattr(inode, name, buffer, size);
> +	name = xattr_full_name(handler, name);
> +	return __ubifs_getxattr(inode, name, buffer, size);
>   }
>   
>   static int ubifs_xattr_set(const struct xattr_handler *handler,
> @@ -586,6 +587,8 @@ static int ubifs_xattr_set(const struct xattr_handler *handler,
>   	dbg_gen("xattr '%s', host ino %lu ('%pd'), size %zd",
>   		name, inode->i_ino, dentry, size);
>   
> +	name = xattr_full_name(handler, name);
> +
>   	if (value)
>   		return __ubifs_setxattr(inode, name, value, size, flags);
>   	else

      parent reply	other threads:[~2016-08-17 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-31 19:42 [PATCH] ubifs: Fix xattr generic handler usage Richard Weinberger
2016-08-01  8:51 ` Andreas Grünbacher
2016-08-17 12:06 ` Dongsheng Yang [this message]

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=57B4535C.1020201@gmail.com \
    --to=dongsheng081251@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.