sys/vfs/hammer2: Use HAMMER2_FREEMAP_LEVEL1_SIZE
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 12 Aug 2019 16:00:06 +0000 (01:00 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 12 Aug 2019 16:00:06 +0000 (01:00 +0900)
sys/vfs/hammer2/hammer2_freemap.c

index 23811a0..8248b9a 100644 (file)
@@ -121,8 +121,7 @@ hammer2_freemap_reserve(hammer2_chain_t *chain, int radix)
                index = 0;
        } else {
                off = bref->data_off & ~HAMMER2_OFF_MASK_RADIX &
-                     (((hammer2_off_t)1 <<
-                       HAMMER2_FREEMAP_LEVEL1_RADIX) - 1);
+                     (HAMMER2_FREEMAP_LEVEL1_SIZE - 1);
                off = off / HAMMER2_PBUFSIZE;
                KKASSERT(off >= HAMMER2_ZONE_FREEMAP_00 &&
                         off < HAMMER2_ZONE_FREEMAP_END);