]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/hugetlb.c
mapping_set_error: add unlikely()
[linux-2.6-omap-h63xx.git] / mm / hugetlb.c
index bbf953eeb58bafbad0016a6f73db4844e5514c22..2c5c9ee4220de4e9bb06addd6137ac0ce243d273 100644 (file)
@@ -603,7 +603,6 @@ static unsigned long set_max_huge_pages(unsigned long count)
        }
 
        while (count > persistent_huge_pages) {
-               int ret;
                /*
                 * If this allocation races such that we no longer need the
                 * page, free_huge_page will handle it by freeing the page
@@ -785,7 +784,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
                        continue;
 
                spin_lock(&dst->page_table_lock);
-               spin_lock(&src->page_table_lock);
+               spin_lock_nested(&src->page_table_lock, SINGLE_DEPTH_NESTING);
                if (!huge_pte_none(huge_ptep_get(src_pte))) {
                        if (cow)
                                huge_ptep_set_wrprotect(src, addr, src_pte);