[10/14] lustre: llite: user xattr_prefix() to create xattr full name
diff mbox series

Message ID 1546810607-6348-11-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: fixes for many test failures
Related show

Commit Message

James Simmons Jan. 6, 2019, 9:36 p.m. UTC
Some xattrs use the prefix field and some like ACLs use the name
field. The function xattr_prefix() was created to handle these
cases. A patch was landed to properly handle this but a part of
the patch was missed in the merger. For the creation of fulname
use xattr_prefix() instead of the handler prefix field.

Fixes: ab42bc01284 ("staging: lustre: llite: use xattr_handler name for ACLs")
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/xattr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
index 5e27c85..aeaa04a 100644
--- a/drivers/staging/lustre/lustre/llite/xattr.c
+++ b/drivers/staging/lustre/lustre/llite/xattr.c
@@ -140,7 +140,7 @@  static int ll_xattr_set_common(const struct xattr_handler *handler,
 			return -EPERM;
 	}
 
-	fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
+	fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
 	if (!fullname)
 		return -ENOMEM;
 
@@ -443,7 +443,7 @@  static int ll_xattr_get_common(const struct xattr_handler *handler,
 	if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
 		return -ENODATA;
 #endif
-	fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
+	fullname = kasprintf(GFP_KERNEL, "%s%s", xattr_prefix(handler), name);
 	if (!fullname)
 		return -ENOMEM;