]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: check the flags earlier in xfs_attr_match
authorChristoph Hellwig <hch@lst.de>
Mon, 29 Jul 2024 23:22:45 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:02 +0000 (17:01 -0700)
commitf79cc2d67178f402dcc69c7e20003425e1597715
tree9dc12313000f255723478c44467949ad8c7ce2fd
parent8c25f2285d993c7bfd176802cad139203366e373
xfs: check the flags earlier in xfs_attr_match

Source kernel commit: f49af061f49c004fb6df7f791f39f9ed370f767b

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>
libxfs/xfs_attr_leaf.c