slub: Move debug handlign in __slab_free
[pandora-kernel.git] / mm / hugetlb.c
index bb0b7c1..06de5aa 100644 (file)
@@ -1872,8 +1872,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
        unsigned long tmp;
        int ret;
 
-       if (!write)
-               tmp = h->max_huge_pages;
+       tmp = h->max_huge_pages;
 
        if (write && h->order >= MAX_ORDER)
                return -EINVAL;
@@ -1938,8 +1937,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
        unsigned long tmp;
        int ret;
 
-       if (!write)
-               tmp = h->nr_overcommit_huge_pages;
+       tmp = h->nr_overcommit_huge_pages;
 
        if (write && h->order >= MAX_ORDER)
                return -EINVAL;