staging: erofs: use xattr_prefix to wrap up

Let's use xattr_prefix instead of open code.
No logic changes.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Gao Xiang 2019-01-29 16:35:19 +08:00 committed by Greg Kroah-Hartman
parent f2829d070f
commit a24df1f62f

View File

@ -520,8 +520,7 @@ static int xattr_entrylist(struct xattr_iter *_it,
if (h == NULL || (h->list != NULL && !h->list(it->dentry)))
return 1;
/* Note that at least one of 'prefix' and 'name' should be non-NULL */
prefix = h->prefix != NULL ? h->prefix : h->name;
prefix = xattr_prefix(h);
prefix_len = strlen(prefix);
if (it->buffer == NULL) {