--- 2.3.18ac9-mapbug/drivers/block/ll_rw_blk.c.~1~ Tue Sep 14 14:35:35 1999 +++ 2.3.18ac9-mapbug/drivers/block/ll_rw_blk.c Tue Sep 28 02:25:36 1999 @@ -416,10 +416,6 @@ count = bh->b_size >> 9; sector = bh->b_rsector; - /* We'd better have a real physical mapping! */ - if (!buffer_mapped(bh)) - BUG(); - /* It had better not be a new buffer by the time we see it */ if (buffer_new(bh)) BUG(); @@ -479,6 +475,13 @@ " must be R/W/RA/WA\n"); goto end_io; } + + /* We'd better have a real physical mapping! + Check this bit only if the buffer was dirty and just locked + down by us so at this point flushpage will block and + won't clear the mapped bit under us. */ + if (!buffer_mapped(bh)) + BUG(); /* look for a free request. */ /* Loop uses two requests, 1 for loop and 1 for the real device.