patch-2.4.1 linux/mm/filemap.c
Next file: linux/mm/memory.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Mon Jan 15 17:14:41 2001
- Orig file:
v2.4.0/linux/mm/filemap.c
- Orig date:
Tue Jan 2 18:59:45 2001
diff -u --recursive --new-file v2.4.0/linux/mm/filemap.c linux/mm/filemap.c
@@ -143,7 +143,8 @@
list_add(&page->list, &mapping->dirty_pages);
spin_unlock(&pagecache_lock);
- mark_inode_dirty_pages(mapping->host);
+ if (mapping->host)
+ mark_inode_dirty_pages(mapping->host);
}
/**
@@ -306,7 +307,7 @@
*/
age_page_up(page);
if (inactive_shortage() > inactive_target / 2 && free_shortage())
- wakeup_kswapd(0);
+ wakeup_kswapd();
not_found:
return page;
}
@@ -974,10 +975,6 @@
* accessed sequentially.
*/
if (ahead) {
- if (reada_ok == 2) {
- run_task_queue(&tq_disk);
- }
-
filp->f_ralen += ahead;
filp->f_rawin += filp->f_ralen;
filp->f_raend = raend + ahead + 1;
@@ -1835,7 +1832,8 @@
n->vm_end = end;
setup_read_behavior(n, behavior);
n->vm_raend = 0;
- get_file(n->vm_file);
+ if (n->vm_file)
+ get_file(n->vm_file);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
lock_vma_mappings(vma);
@@ -1861,7 +1859,8 @@
n->vm_pgoff += (n->vm_start - vma->vm_start) >> PAGE_SHIFT;
setup_read_behavior(n, behavior);
n->vm_raend = 0;
- get_file(n->vm_file);
+ if (n->vm_file)
+ get_file(n->vm_file);
if (n->vm_ops && n->vm_ops->open)
n->vm_ops->open(n);
lock_vma_mappings(vma);
@@ -1893,7 +1892,8 @@
right->vm_pgoff += (right->vm_start - left->vm_start) >> PAGE_SHIFT;
left->vm_raend = 0;
right->vm_raend = 0;
- atomic_add(2, &vma->vm_file->f_count);
+ if (vma->vm_file)
+ atomic_add(2, &vma->vm_file->f_count);
if (vma->vm_ops && vma->vm_ops->open) {
vma->vm_ops->open(left);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)