summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2_node.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-15 23:54:34 +0200
committerDarrick J. Wong <djwong@kernel.org>2024-04-15 23:58:50 +0200
commit17a85dc64ae0804d33a2293686fc987a830a462d (patch)
tree7eac08cc65abdcdcf64cad5adb38e7ee33ba357b /fs/xfs/libxfs/xfs_dir2_node.c
parentxfs: add an explicit owner field to xfs_da_args (diff)
downloadlinux-17a85dc64ae0804d33a2293686fc987a830a462d.tar.xz
linux-17a85dc64ae0804d33a2293686fc987a830a462d.zip
xfs: use the xfs_da_args owner field to set new dir/attr block owner
When we're creating leaf, data, freespace, or dabtree blocks for directories and xattrs, use the explicit owner field (instead of the xfs_inode) to set the owner field. This will enable online repair to construct replacement data structures in a temporary file without having to change the owner fields prior to swapping the new and old structures. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_node.c b/fs/xfs/libxfs/xfs_dir2_node.c
index be0b8834028c..1ad7405f9c38 100644
--- a/fs/xfs/libxfs/xfs_dir2_node.c
+++ b/fs/xfs/libxfs/xfs_dir2_node.c
@@ -349,7 +349,7 @@ xfs_dir3_free_get_buf(
hdr.magic = XFS_DIR3_FREE_MAGIC;
hdr3->hdr.blkno = cpu_to_be64(xfs_buf_daddr(bp));
- hdr3->hdr.owner = cpu_to_be64(dp->i_ino);
+ hdr3->hdr.owner = cpu_to_be64(args->owner);
uuid_copy(&hdr3->hdr.uuid, &mp->m_sb.sb_meta_uuid);
} else
hdr.magic = XFS_DIR2_FREE_MAGIC;