[Bug 261850] fs/ext2fs: Fix bug in disk data block allocation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Feb 2022 07:19:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261850
--- Comment #3 from chenguang.wang <chenguang.wang@terapines.com> ---
Created attachment 231702
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231702&action=edit
fs/ext2fs: Fix bug in disk data block allocation.
git diff fs/ext2fs/ext2_alloc.c
diff --git a/fs/ext2fs/ext2_alloc.c b/fs/ext2fs/ext2_alloc.c
index 4c265a1a8..9e05d02de 100644
--- a/fs/ext2fs/ext2_alloc.c
+++ b/fs/ext2fs/ext2_alloc.c
@@ -1067,7 +1067,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;
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.