summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-08-08 13:58:09 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:54 -0700
commit189dbc73b62f6161e42564eb4c0fc9835c79b438 (patch)
treef0a4fcf3aa94855c8ea4247bfec9f90b0b36bcde /fs/xfs/libxfs/xfs_dir2_leaf.c
parente368f5ec327fa782b3710e8c754aca7e0f932d9b (diff)
xfs: validate explicit directory free block ownersdirattr-validate-owners_2022-10-14
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 <djwong@kernel.org>
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 7aa8612fe4ee..3be36b5834ef 100644
--- a/fs/xfs/libxfs/xfs_dir2_leaf.c
+++ b/fs/xfs/libxfs/xfs_dir2_leaf.c
@@ -1800,7 +1800,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);