summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2006-04-13 19:37:32 +0000
committercracauer <cracauer@FreeBSD.org>2006-04-13 19:37:32 +0000
commit65aeb543f38c35372f717f654ab9ddab09e77d7b (patch)
tree2bbaa96155aa35146e7236c6e09835295fdd94bb /sys/gnu
parent054ff1b4671b4d17fee388e9e38b3a7c95e2d3b8 (diff)
downloadFreeBSD-src-65aeb543f38c35372f717f654ab9ddab09e77d7b.zip
FreeBSD-src-65aeb543f38c35372f717f654ab9ddab09e77d7b.tar.gz
Repair ext2fs writes.
Strong candidate for backport to 6.x. When allocating new blocks, the search for block group beginnings would fail with a segfault. There was a side-effect read access with an off-by-one errors. The results were not used in the error case so the code worked in the past. But now the FreeBSD kernel has tighter mappings and the word accessed is not mapped (for me). The Linux kernel has rewritten most of the allocation strategy by now. Also, the Linux kernel cleaned up the integration of these files and it look feasable to wrap the original Linux files in wrapper that provides their favorite arguments instead of dragging around our own code.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_bitops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_bitops.h b/sys/gnu/fs/ext2fs/ext2_bitops.h
index 47d76cf..0ee54a1 100644
--- a/sys/gnu/fs/ext2fs/ext2_bitops.h
+++ b/sys/gnu/fs/ext2fs/ext2_bitops.h
@@ -88,7 +88,7 @@ find_next_zero_bit(void *data, size_t sz, size_t ofs)
p++;
ofs = (ofs + 31U) & ~31U;
}
- while(*p == ~0U && ofs < sz) {
+ while(ofs < sz && *p == ~0U) {
p++;
ofs += 32;
}
OpenPOWER on IntegriCloud