summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_exchmaps.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-16 00:54:36 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-04-16 00:58:51 +0300
commitf4887fbc41dcb1560ec5da982ac7c6ad04b71de5 (patch)
treedda77034fb9f6b655c77bd9449626114779d5f75 /fs/xfs/libxfs/xfs_exchmaps.c
parent33c028ffe36ad7a91930acf0bd3d6ee7340022bf (diff)
downloadlinux-f4887fbc41dcb1560ec5da982ac7c6ad04b71de5.tar.xz
xfs: validate attr leaf buffer owners
Create a leaf block header checking function to validate the owner field of xattr leaf blocks. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_exchmaps.c')
-rw-r--r--fs/xfs/libxfs/xfs_exchmaps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c
index 8d28e8cce5e9..9c9cf2e998b2 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.c
+++ b/fs/xfs/libxfs/xfs_exchmaps.c
@@ -438,7 +438,8 @@ xfs_exchmaps_attr_to_sf(
if (!xfs_attr_is_leaf(xmi->xmi_ip2))
return 0;
- error = xfs_attr3_leaf_read(tp, xmi->xmi_ip2, 0, &bp);
+ error = xfs_attr3_leaf_read(tp, xmi->xmi_ip2, xmi->xmi_ip2->i_ino, 0,
+ &bp);
if (error)
return error;