summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_readdir.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-15 23:54:40 +0200
committerDarrick J. Wong <djwong@kernel.org>2024-04-15 23:58:52 +0200
commitcc6740ddb423db2066f7669eaaa377fdbf84ab1e (patch)
treef8eedd4acae8e7895eec0b3f584943f0b705224b /fs/xfs/xfs_dir2_readdir.c
parentxfs: validate directory leaf buffer owners (diff)
downloadlinux-cc6740ddb423db2066f7669eaaa377fdbf84ab1e.tar.xz
linux-cc6740ddb423db2066f7669eaaa377fdbf84ab1e.zip
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>
Diffstat (limited to '')
-rw-r--r--fs/xfs/xfs_dir2_readdir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index 4e811fa393ad..2c03371b542a 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -282,7 +282,8 @@ xfs_dir2_leaf_readbuf(
new_off = xfs_dir2_da_to_byte(geo, map.br_startoff);
if (new_off > *cur_off)
*cur_off = new_off;
- error = xfs_dir3_data_read(args->trans, dp, map.br_startoff, 0, &bp);
+ error = xfs_dir3_data_read(args->trans, dp, args->owner,
+ map.br_startoff, 0, &bp);
if (error)
goto out;