xfs: validate explicit directory data buffer owners
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:40 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:52 +0000 (14:58 -0700)
commitcc6740ddb423db2066f7669eaaa377fdbf84ab1e
treef8eedd4acae8e7895eec0b3f584943f0b705224b
parent402eef10a1bab0b428c418cfbaaa0a62efc9c951
xfs: validate explicit directory data buffer owners

Port the existing directory data 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_data.c
fs/xfs/libxfs/xfs_dir2_leaf.c
fs/xfs/libxfs/xfs_dir2_node.c
fs/xfs/libxfs/xfs_dir2_priv.h
fs/xfs/scrub/dir.c
fs/xfs/scrub/readdir.c
fs/xfs/xfs_dir2_readdir.c