diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-06-03 07:28:06 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-06-03 07:28:06 +0000 |
commit | edb5c61526e98426a5f3da889463c2b8d85d04c0 (patch) | |
tree | 27965970d5fe47655e451ef3251cc20df75e04b7 /mm | |
parent | 2e6827eb279d02923bf12eb0cfc077b26f545953 (diff) |
Sync with Linux 2.1.41
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 1 | ||||
-rw-r--r-- | mm/slab.c | 1 | ||||
-rw-r--r-- | mm/vmscan.c | 18 |
3 files changed, 18 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 19b3aa125..e32f1a92e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -343,4 +343,3 @@ void swap_in(struct task_struct * tsk, struct vm_area_struct * vma, swap_free(entry); return; } - @@ -1433,6 +1433,7 @@ alloc_new_slab: /* Someone may have stolen our objs. Doesn't matter, we'll * just come back here again. */ + spin_lock_irq(&cachep->c_spinlock); goto try_again; } /* Couldn't grow, but some objs may have been freed. */ diff --git a/mm/vmscan.c b/mm/vmscan.c index d890be5df..875f668ee 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -345,7 +345,7 @@ out: * to be. This works out OK, because we now do proper aging on page * contents. */ -int try_to_free_page(int priority, int dma, int wait) +static inline int do_try_to_free_page(int priority, int dma, int wait) { static int state = 0; int i=6; @@ -379,6 +379,22 @@ int try_to_free_page(int priority, int dma, int wait) return 0; } +/* + * This is REALLY ugly. + * + * We need to make the locks finer granularity, but right + * now we need this so that we can do page allocations + * without holding the kernel lock etc. + */ +int try_to_free_page(int priority, int dma, int wait) +{ + int retval; + + lock_kernel(); + retval = do_try_to_free_page(priority,dma,wait); + unlock_kernel(); + return retval; +} /* * The background pageout daemon. |