]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thp: remove unnecessary check in start_khugepaged
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Fri, 28 Sep 2012 00:19:16 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 9 Oct 2012 03:12:18 +0000 (14:12 +1100)
The check is unnecessary since if mm_slot_cache or mm_slots_hash
initialize failed, no sysfs interface will be created

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index 8dbc65e08417c231754c971b0a2cae94a4e9b45c..d089f9308baa2688f939a9d422fb1e957abb9f65 100644 (file)
@@ -141,10 +141,7 @@ static int start_khugepaged(void)
        int err = 0;
        if (khugepaged_enabled()) {
                int wakeup;
-               if (unlikely(!mm_slot_cache || !mm_slots_hash)) {
-                       err = -ENOMEM;
-                       goto out;
-               }
+
                mutex_lock(&khugepaged_mutex);
                if (!khugepaged_thread)
                        khugepaged_thread = kthread_run(khugepaged, NULL,
@@ -164,7 +161,7 @@ static int start_khugepaged(void)
        } else
                /* wakeup to exit */
                wake_up_interruptible(&khugepaged_wait);
-out:
+
        return err;
 }