[XFS] Fix superblock validation regression for the zero imaxpct case.
authorNathan Scott <nathans@sgi.com>
Tue, 11 Apr 2006 05:10:45 +0000 (15:10 +1000)
committerNathan Scott <nathans@sgi.com>
Tue, 11 Apr 2006 05:10:45 +0000 (15:10 +1000)
Thanks to kjamieson for noticing.

SGI-PV: 951661
SGI-Modid: xfs-linux-melb:xfs-kern:25675a

Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/xfs_mount.c

index 049fabb7f7e0b87652586e30d6224a0f847de2ce..c0b1c2906880da1b58bcb217c4c11c407ee539d0 100644 (file)
@@ -270,7 +270,7 @@ xfs_mount_validate_sb(
            (sbp->sb_blocklog - sbp->sb_inodelog != sbp->sb_inopblog)   ||
            (sbp->sb_rextsize * sbp->sb_blocksize > XFS_MAX_RTEXTSIZE)  ||
            (sbp->sb_rextsize * sbp->sb_blocksize < XFS_MIN_RTEXTSIZE)  ||
-           (sbp->sb_imax_pct > 100 || sbp->sb_imax_pct < 1))) {
+           (sbp->sb_imax_pct > 100 /* zero sb_imax_pct is valid */))) {
                xfs_fs_mount_cmn_err(flags, "SB sanity check 1 failed");
                return XFS_ERROR(EFSCORRUPTED);
        }