提交 ef8c233b 编写于 作者: J James Simmons 提交者: Greg Kroah-Hartman

staging: lustre: llite: remove newline in fullname strings

In creating the full name of a xattr a new line was added that
was seen by the remote MDS server which confused it. Remove the
newline.
Signed-off-by: NJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183
Reviewed-on: https://review.whamcloud.com/27240Reviewed-by: NDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: NBob Glossman <bob.glossman@intel.com>
Reviewed-by: NSebastien Buisson <sbuisson@ddn.com>
Reviewed-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NJames Simmons <jsimmons@infradead.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f5d9960b
...@@ -136,7 +136,7 @@ ll_xattr_set_common(const struct xattr_handler *handler, ...@@ -136,7 +136,7 @@ ll_xattr_set_common(const struct xattr_handler *handler,
return -EPERM; return -EPERM;
} }
fullname = kasprintf(GFP_KERNEL, "%s%s\n", handler->prefix, name); fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
if (!fullname) if (!fullname)
return -ENOMEM; return -ENOMEM;
rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode),
...@@ -435,7 +435,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, ...@@ -435,7 +435,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode)) if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
return -ENODATA; return -ENODATA;
#endif #endif
fullname = kasprintf(GFP_KERNEL, "%s%s\n", handler->prefix, name); fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
if (!fullname) if (!fullname)
return -ENOMEM; return -ENOMEM;
rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size, rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册