Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[firefly-linux-kernel-4.4.55.git] / mm / hugetlb.c
index bb0b7c128015f5cbb9f23d78b88c4b5e6eec2e7b..06de5aa4d64415af31fc5137ded307b634ae2c7b 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;