summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_swapext.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-08-08 11:52:45 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:53 -0700
commited6b64d2da18c5face03b9ffbc2e78e9015bc13d (patch)
treefd90bcddf2d4084eb39a0942976054968c1c179d /fs/xfs/libxfs/xfs_swapext.c
parent6c1f2a60ebef79911cdd91292a789a3cb0b62165 (diff)
xfs: add an explicit owner field to xfs_da_args
Add an explicit owner field to xfs_da_args, which will make it easier for online fsck to set the owner field of the temporary directory and xattr structures that it builds to repair damaged metadata. Note: I hopefully found all the xfs_da_args definitions by looking for automatic stack variable declarations and xfs_da_args.dp assignments: git grep -E '(args.*dp =|struct xfs_da_args[[:space:]]*[a-z0-9][a-z0-9]*)' Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_swapext.c')
-rw-r--r--fs/xfs/libxfs/xfs_swapext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_swapext.c b/fs/xfs/libxfs/xfs_swapext.c
index f0d7e4e20436..76e7fd83aa21 100644
--- a/fs/xfs/libxfs/xfs_swapext.c
+++ b/fs/xfs/libxfs/xfs_swapext.c
@@ -466,6 +466,7 @@ xfs_swapext_attr_to_sf(
.geo = tp->t_mountp->m_attr_geo,
.whichfork = XFS_ATTR_FORK,
.trans = tp,
+ .owner = sxi->sxi_ip2->i_ino,
};
struct xfs_buf *bp;
int forkoff;
@@ -496,6 +497,7 @@ xfs_swapext_dir_to_sf(
.geo = tp->t_mountp->m_dir_geo,
.whichfork = XFS_DATA_FORK,
.trans = tp,
+ .owner = sxi->sxi_ip2->i_ino,
};
struct xfs_dir2_sf_hdr sfh;
struct xfs_buf *bp;