No, any b_data < PAGE_OFFSET is not wrong, that's the point. For highmem
b_page, b_data will be the offset into the page. So it could be 2048,
for instance.
The test is meant to catch an invalid buffer_head, where b_page is not
set but b_data isn't valid either. So to make it complete, you could do:
if (bh->b_page) {
...
if (bh->b_data >= PAGE_SIZE)
BUG();
} else {
...
if (bh->b_data < PAGE_SIZE)
BUG();
if (bh->b_data < PAGE_OFFSET)
BUG();
}
as they are two different bugs.
> Anyway, let's leave 2.4 as it is now.
:-)
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/