fs: simplify ->listxattr() implementation
authorChristian Brauner <brauner@kernel.org>
Wed, 1 Feb 2023 13:14:56 +0000 (14:14 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Mon, 6 Mar 2023 08:57:12 +0000 (09:57 +0100)
commita5488f29835c0eb5561b46e71c23f6c39aab6c83
tree72f17e309903875f8296d483d535126d505d1ec5
parent0c95c025a02e477b2d112350e1c78bb0cc994c51
fs: simplify ->listxattr() implementation

The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to
check whether a given xattr can be listed. Simplify them and avoid
open-coding the same check by calling the helper we introduced earlier.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: linux-f2fs-devel@lists.sourceforge.net
Cc: linux-erofs@lists.ozlabs.org
Cc: linux-ext4@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/erofs/xattr.c
fs/erofs/xattr.h
fs/ext2/xattr.c
fs/ext4/xattr.c
fs/f2fs/xattr.c
fs/jffs2/xattr.c