OSDN Git Service

xfs: const-ify xfs_owner_info arguments
[uclinux-h8/linux.git] / fs / xfs / scrub / refcount.c
index e8c82b0..b7ade62 100644 (file)
@@ -383,9 +383,9 @@ xchk_refcountbt_rec(
 STATIC void
 xchk_refcount_xref_rmap(
        struct xfs_scrub        *sc,
-       struct xfs_owner_info   *oinfo,
        xfs_filblks_t           cow_blocks)
 {
+       struct xfs_owner_info   oinfo;
        xfs_extlen_t            refcbt_blocks = 0;
        xfs_filblks_t           blocks;
        int                     error;
@@ -394,10 +394,11 @@ xchk_refcount_xref_rmap(
                return;
 
        /* Check that we saw as many refcbt blocks as the rmap knows about. */
+       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_REFC);
        error = xfs_btree_count_blocks(sc->sa.refc_cur, &refcbt_blocks);
        if (!xchk_btree_process_error(sc, sc->sa.refc_cur, 0, &error))
                return;
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, oinfo,
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
                        &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
@@ -405,8 +406,8 @@ xchk_refcount_xref_rmap(
                xchk_btree_xref_set_corrupt(sc, sc->sa.rmap_cur, 0);
 
        /* Check that we saw as many cow blocks as the rmap knows about. */
-       xfs_rmap_ag_owner(oinfo, XFS_RMAP_OWN_COW);
-       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, oinfo,
+       xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_COW);
+       error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, &oinfo,
                        &blocks);
        if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur))
                return;
@@ -429,7 +430,7 @@ xchk_refcountbt(
        if (error)
                return error;
 
-       xchk_refcount_xref_rmap(sc, &oinfo, cow_blocks);
+       xchk_refcount_xref_rmap(sc, cow_blocks);
 
        return 0;
 }