]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_{db,repair}: add an explicit owner field to xfs_da_args
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:02 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:06 +0000 (17:01 -0700)
Update these two utilities to set the owner field of the da args
structure prior to calling directory and extended attribute functions.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/namei.c
repair/phase6.c

index 6de0621616a606c057ac321dc9e7ff6776878b78..41ccaa04b659fd617c5223b81144f7b5eb84e692 100644 (file)
@@ -447,6 +447,7 @@ listdir(
        struct xfs_da_args      args = {
                .dp             = dp,
                .geo            = dp->i_mount->m_dir_geo,
+               .owner          = dp->i_ino,
        };
        int                     error;
 
index 1e985e7db068c8d2fd7f563260b131aeded8a3bb..92a58db0d236b51709f21a7b5d96c714bd2dacd9 100644 (file)
@@ -1401,6 +1401,7 @@ dir2_kill_block(
        args.trans = tp;
        args.whichfork = XFS_DATA_FORK;
        args.geo = mp->m_dir_geo;
+       args.owner = ip->i_ino;
        if (da_bno >= mp->m_dir_geo->leafblk && da_bno < mp->m_dir_geo->freeblk)
                error = -libxfs_da_shrink_inode(&args, da_bno, bp);
        else
@@ -1505,6 +1506,7 @@ longform_dir2_entry_check_data(
        struct xfs_da_args      da = {
                .dp = ip,
                .geo = mp->m_dir_geo,
+               .owner = ip->i_ino,
        };
 
 
@@ -2294,6 +2296,7 @@ longform_dir2_entry_check(
        /* is this a block, leaf, or node directory? */
        args.dp = ip;
        args.geo = mp->m_dir_geo;
+       args.owner = ip->i_ino;
        fmt = libxfs_dir2_format(&args, &error);
 
        /* check directory "data" blocks (ie. name/inode pairs) */