Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452872 > unrolled thread
| Started by | Richard Weinberger <richard@nod.at> |
|---|---|
| First post | 2016-07-31 21:50 +0200 |
| Last post | 2016-08-01 11:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ubifs: Fix xattr generic handler usage Richard Weinberger <richard@nod.at> - 2016-07-31 21:50 +0200
Re: [PATCH] ubifs: Fix xattr generic handler usage Andreas Grünbacher <andreas.gruenbacher@gmail.com> - 2016-08-01 11:00 +0200
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2016-07-31 21:50 +0200 |
| Subject | [PATCH] ubifs: Fix xattr generic handler usage |
| Message-ID | <s14Ui-4mA-25@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Andreas Grünbacher <andreas.gruenbacher@gmail.com> |
|---|---|
| Date | 2016-08-01 11:00 +0200 |
| Message-ID | <s1heN-40C-11@gated-at.bofh.it> |
| In reply to | #1452872 |
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
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web