xfs: enforce one namespace per attribute
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:47:34 +0000 (09:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 14:46:54 +0000 (07:46 -0700)
commitea0b3e814741fb64e7785b564ea619578058e0b0
treef929634f272b8a93439d74db14b116d880a22959
parentffdcc3b8eb4d5ab263d04b9c4b2c6072c7b3c1e9
xfs: enforce one namespace per attribute

Create a standardized helper function to enforce one namespace bit per
extended attribute, and refactor all the open-coded hweight logic.  This
function is not a static inline to avoid porting hassles in userspace.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_attr.h
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/scrub/attr.c
fs/xfs/scrub/attr_repair.c
fs/xfs/xfs_attr_item.c
fs/xfs/xfs_attr_list.c