patch-2.0.18 linux/mm/page_io.c
Next file: linux/net/ipv4/icmp.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Tue Sep 3 13:10:36 1996
- Orig file:
v2.0.17/linux/mm/page_io.c
- Orig date:
Mon Jun 3 15:38:37 1996
diff -u --recursive --new-file v2.0.17/linux/mm/page_io.c linux/mm/page_io.c
@@ -168,9 +168,10 @@
* asynchronous function now --- we must call wait_on_page afterwards
* if synchronous IO is required.
*/
-void ll_rw_page(int rw, kdev_t dev, unsigned long page, char * buffer)
+void ll_rw_page(int rw, kdev_t dev, unsigned long offset, char * buffer)
{
- int block = page;
+ int block = offset;
+ struct page *page;
switch (rw) {
case READ:
@@ -185,7 +186,8 @@
default:
panic("ll_rw_page: bad block dev cmd, must be R/W");
}
- if (set_bit(PG_locked, &mem_map[MAP_NR(buffer)].flags))
+ page = mem_map + MAP_NR(buffer);
+ if (set_bit(PG_locked, &page->flags))
panic ("ll_rw_page: page already locked");
- brw_page(rw, (unsigned long) buffer, dev, &block, PAGE_SIZE, 0);
+ brw_page(rw, page, dev, &block, PAGE_SIZE, 0);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov