xattr: simplify listxattr helpers
authorChristian Brauner <brauner@kernel.org>
Wed, 1 Feb 2023 13:14:52 +0000 (14:14 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Mon, 6 Mar 2023 08:57:07 +0000 (09:57 +0100)
commitf2620f166e2a4db08f016b7b30b904ab28c265e4
tree11a350c4f48ac673b05b1f3c4f5c14677575cf97
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
xattr: simplify listxattr helpers

The generic_listxattr() and simple_xattr_list() helpers list xattrs and
contain duplicated code. Add two helpers that both generic_listxattr()
and simple_xattr_list() can use.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/posix_acl.c
fs/xattr.c
include/linux/posix_acl.h
include/linux/xattr.h