patch-2.4.10 linux/mm/highmem.c
Next file: linux/mm/memory.c
Previous file: linux/mm/filemap.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Sep 18 14:10:43 2001
- Orig file:
v2.4.9/linux/mm/highmem.c
- Orig date:
Mon Aug 27 12:41:49 2001
diff -u --recursive --new-file v2.4.9/linux/mm/highmem.c linux/mm/highmem.c
@@ -212,9 +212,9 @@
p_from = from->b_page;
- vfrom = kmap_atomic(p_from, KM_BOUNCE_WRITE);
+ vfrom = kmap_atomic(p_from, KM_USER0);
memcpy(to->b_data, vfrom + bh_offset(from), to->b_size);
- kunmap_atomic(vfrom, KM_BOUNCE_WRITE);
+ kunmap_atomic(vfrom, KM_USER0);
}
static inline void copy_to_high_bh_irq (struct buffer_head *to,
@@ -273,6 +273,13 @@
static __init int init_emergency_pool(void)
{
+ struct sysinfo i;
+ si_meminfo(&i);
+ si_swapinfo(&i);
+
+ if (!i.totalhigh)
+ return 0;
+
spin_lock_irq(&emergency_lock);
while (nr_emergency_pages < POOL_SIZE) {
struct page * page = alloc_page(GFP_ATOMIC);
@@ -321,7 +328,7 @@
struct page *page;
repeat_alloc:
- page = alloc_page(GFP_NOIO);
+ page = alloc_page(GFP_NOHIGHIO);
if (page)
return page;
/*
@@ -359,7 +366,7 @@
struct buffer_head *bh;
repeat_alloc:
- bh = kmem_cache_alloc(bh_cachep, SLAB_NOIO);
+ bh = kmem_cache_alloc(bh_cachep, SLAB_NOHIGHIO);
if (bh)
return bh;
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)