erofs: use separate xattr parsers for listxattr/getxattr
authorJingbo Xu <jefflexu@linux.alibaba.com>
Tue, 13 Jun 2023 07:41:14 +0000 (15:41 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 18 Jun 2023 04:10:54 +0000 (12:10 +0800)
commitf02615eb6f5a1e732230784bf0e3b6543540e853
treec2681d24c7f06cd135cb689279276421b42907ff
parent4b077b501266c6c6784656cd8721db37c090c5df
erofs: use separate xattr parsers for listxattr/getxattr

There's a callback styled xattr parser, i.e. xattr_foreach(), which is
shared among listxattr and getxattr.

Convert it to two separate xattr parsers to serve listxattr and getxattr
for better readability.

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230613074114.120115-6-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/xattr.c