* [PATCH] ubifs: Fix xattr generic handler usage
@ 2016-07-31 19:42 Richard Weinberger
2016-08-01 8:51 ` Andreas Grünbacher
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2016-07-31 19:42 UTC (permalink / raw)
To: linux-mtd
Cc: linux-kernel, adrian.hunter, dedekind1, richard, stable,
Andreas Gruenbacher
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>
---
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
--
2.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ubifs: Fix xattr generic handler usage
2016-07-31 19:42 [PATCH] ubifs: Fix xattr generic handler usage Richard Weinberger
@ 2016-08-01 8:51 ` Andreas Grünbacher
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Grünbacher @ 2016-08-01 8:51 UTC (permalink / raw)
To: Richard Weinberger
Cc: linux-mtd, Linux Kernel Mailing List, Adrian Hunter,
Artem Bityutskiy, stable, Andreas Gruenbacher
2016-07-31 21:42 GMT+02:00 Richard Weinberger <richard@nod.at>:
> 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>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
> ---
> 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
> --
> 2.7.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-01 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 19:42 [PATCH] ubifs: Fix xattr generic handler usage Richard Weinberger
2016-08-01 8:51 ` Andreas Grünbacher
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).