xfs: check the flags earlier in xfs_attr_match
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 16:47:36 +0000 (09:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 14:46:55 +0000 (07:46 -0700)
commitf49af061f49c004fb6df7f791f39f9ed370f767b
tree25e0d1740db3b617bf78acb654e0aad6dec8dd28
parent63211876ced33fbb730f515e8d830de53533fc82
xfs: check the flags earlier in xfs_attr_match

Checking the flags match is much cheaper than a memcmp, so do it early
on in xfs_attr_match, and also add a little helper to calculate the
match mask right under the comment explaining the logic for it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_attr_leaf.c