From 344243fc9213f78b2af5f089cb8b9e0e60706705 Mon Sep 17 00:00:00 2001 From: Fedor Uporov Date: Thu, 26 Jan 2023 13:06:25 +0300 Subject: [PATCH] Fix block bitmap end position computation PR: 261850 Reported by: chenguang.wang MFC after: 2 weeks --- sys/fs/ext2fs/ext2_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c index 489b64a1c0c5..0467e308a7a4 100644 --- a/sys/fs/ext2fs/ext2_alloc.c +++ b/sys/fs/ext2fs/ext2_alloc.c @@ -1068,7 +1068,7 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) start = dtogd(fs, bpref) / NBBY; else start = 0; - end = howmany(fs->e2fs_fpg, NBBY) - start; + end = howmany(fs->e2fs_fpg, NBBY); retry: runlen = 0; runstart = 0;