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.
This commit is contained in:
parent
c1ba2105e8
commit
447be3f1e4
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user