]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: xfs: fix build error with CONFIG_XFS_ONLINE_SCRUB enabled
authorKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Sep 2018 16:56:00 +0000 (18:56 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:40:08 +0000 (14:40 +0200)
BugLink: https://bugs.launchpad.net/bugs/1792393
The backport of a78ee256c325 ("xfs: convert XFS_AGFL_SIZE to a helper
function") was incomplete, missing the replacement of XFS_AGFL_SIZE() by
xfs_agfl_size() on fs/xfs/scrub/agheader.c. This file is only compiled
with CONFIG_XFS_ONLINE_SCRUB enabled.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/xfs/scrub/agheader.c

index 2a9b4f9e93c64be83edad15c0e19edb45269f406..6cd3d32dcbc26dac0443a087c325e4b55e843ee6 100644 (file)
@@ -93,7 +93,7 @@ xfs_scrub_walk_agfl(
        }
 
        /* first to the end */
-       for (i = flfirst; i < XFS_AGFL_SIZE(mp); i++) {
+       for (i = flfirst; i < xfs_agfl_size(mp); i++) {
                error = fn(sc, be32_to_cpu(agfl_bno[i]), priv);
                if (error)
                        return error;
@@ -466,7 +466,7 @@ xfs_scrub_agf(
        if (agfl_last > agfl_first)
                fl_count = agfl_last - agfl_first + 1;
        else
-               fl_count = XFS_AGFL_SIZE(mp) - agfl_first + agfl_last + 1;
+               fl_count = xfs_agfl_size(mp) - agfl_first + agfl_last + 1;
        if (agfl_count != 0 && fl_count != agfl_count)
                xfs_scrub_block_set_corrupt(sc, sc->sa.agf_bp);
 
@@ -536,7 +536,7 @@ xfs_scrub_agfl(
        /* Allocate buffer to ensure uniqueness of AGFL entries. */
        agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
        agflcount = be32_to_cpu(agf->agf_flcount);
-       if (agflcount > XFS_AGFL_SIZE(sc->mp)) {
+       if (agflcount > xfs_agfl_size(sc->mp)) {
                xfs_scrub_block_set_corrupt(sc, sc->sa.agf_bp);
                goto out;
        }