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:
parent
f2829d070f
commit
a24df1f62f
@ -520,8 +520,7 @@ static int xattr_entrylist(struct xattr_iter *_it,
|
|||||||
if (h == NULL || (h->list != NULL && !h->list(it->dentry)))
|
if (h == NULL || (h->list != NULL && !h->list(it->dentry)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Note that at least one of 'prefix' and 'name' should be non-NULL */
|
prefix = xattr_prefix(h);
|
||||||
prefix = h->prefix != NULL ? h->prefix : h->name;
|
|
||||||
prefix_len = strlen(prefix);
|
prefix_len = strlen(prefix);
|
||||||
|
|
||||||
if (it->buffer == NULL) {
|
if (it->buffer == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user