xfs: validate explicit directory block buffer owners
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:41 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:52 +0000 (14:58 -0700)
commit29b41ce919b7f0b0c2220e088e450d9b132bec36
treed7d0ff005a60b54f4405ba336a1f6d2c4a69ffe6
parentcc6740ddb423db2066f7669eaaa377fdbf84ab1e
xfs: validate explicit directory block buffer owners

Port the existing directory block header checking function to accept an
owner number instead of an xfs_inode, then update the callsites to use
xfs_da_args.owner when possible.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_dir2.h
fs/xfs/libxfs/xfs_dir2_block.c
fs/xfs/libxfs/xfs_dir2_priv.h
fs/xfs/libxfs/xfs_exchmaps.c
fs/xfs/scrub/dir.c
fs/xfs/scrub/readdir.c
fs/xfs/xfs_dir2_readdir.c