]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
The agno/block checking was off by one.
authorMadan Valluri <mvalluri@sgi.com>
Tue, 16 May 2006 03:00:15 +0000 (03:00 +0000)
committerMadan Valluri <mvalluri@sgi.com>
Tue, 16 May 2006 03:00:15 +0000 (03:00 +0000)
The agno/block checking was off by one in the verify_ag_bno.

repair/dinode.c

index 4395aa0770ac6651d2db32c9e91668d2e853c655..e384e3e67ccef0cbac26ce71d30bc1a40596f665 100644 (file)
@@ -315,13 +315,13 @@ verify_ag_bno(xfs_sb_t *sbp,
                xfs_agnumber_t agno,
                xfs_agblock_t agbno)
 {
-       if (agno < sbp->sb_agcount) {
+       if (agno < (sbp->sb_agcount - 1)) {
                if (agbno >= sbp->sb_agblocks) {
                        return 1;       /* bad */
                }
                return 0;               /* good */
        }
-       if (agno == sbp->sb_agcount) {
+       if (agno == (sbp->sb_agcount - 1)) {
                if (agbno >=
                        (sbp->sb_dblocks -
                        (sbp->sb_agcount-1) *