]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/asm-ia64/pgalloc.h
[IA64] re-enable preempt before page allocation for pgtable quicklist
[linux-2.6.git] / include / asm-ia64 / pgalloc.h
index e86a8c331ee641cfe574a08fe3280213583ca028..a5f214554afd278830788f5e0673ac2d91fbba04 100644 (file)
@@ -29,7 +29,7 @@ DECLARE_PER_CPU(long, __pgtable_quicklist_size);
 
 static inline long pgtable_quicklist_total_size(void)
 {
-       long ql_size;
+       long ql_size = 0;
        int cpuid;
 
        for_each_online_cpu(cpuid) {
@@ -49,12 +49,12 @@ static inline void *pgtable_quicklist_alloc(void)
                pgtable_quicklist = (unsigned long *)(*ret);
                ret[0] = 0;
                --pgtable_quicklist_size;
+               preempt_enable();
        } else {
+               preempt_enable();
                ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
        }
 
-       preempt_enable();
-
        return ret;
 }