patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / i386 / mm / hugetlbpage.c
index 31aba6a..a8dbbc5 100644 (file)
@@ -267,8 +267,9 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
                                goto out;
                        }
                        ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
-                       unlock_page(page);
-                       if (ret) {
+                       if (! ret) {
+                               unlock_page(page);
+                       } else {
                                hugetlb_put_quota(mapping);
                                free_huge_page(page);
                                goto out;