aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorDarrick J. Wong <[email protected]>2024-04-15 21:54:41 +0000
committerDarrick J. Wong <[email protected]>2024-04-15 21:58:52 +0000
commitfe6c9f8e48e0dcbfc3dba17edd88490c8579b34b (patch)
treedaefe2fda713eb96b84dbc25533c8a7bce0e415d /fs/xfs/libxfs/xfs_dir2_leaf.c
parentxfs: validate explicit directory block buffer owners (diff)
downloadkernel-fe6c9f8e48e0dcbfc3dba17edd88490c8579b34b.tar.gz
kernel-fe6c9f8e48e0dcbfc3dba17edd88490c8579b34b.zip
xfs: validate explicit directory free block owners
Port the existing directory freespace 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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_leaf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_leaf.c b/fs/xfs/libxfs/xfs_dir2_leaf.c
index 0b1b852f6178..71c2f22a3f6e 100644
--- a/fs/xfs/libxfs/xfs_dir2_leaf.c
+++ b/fs/xfs/libxfs/xfs_dir2_leaf.c
@@ -1806,7 +1806,8 @@ xfs_dir2_node_to_leaf(
/*
* Read the freespace block.
*/
- error = xfs_dir2_free_read(tp, dp, args->geo->freeblk, &fbp);
+ error = xfs_dir2_free_read(tp, dp, args->owner, args->geo->freeblk,
+ &fbp);
if (error)
return error;
xfs_dir2_free_hdr_from_disk(mp, &freehdr, fbp->b_addr);