Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 637e3a27 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Linus Torvalds
Browse files

thp: remove unnecessary check in start_khugepaged



The check is unnecessary since if mm_slot_cache or mm_slots_hash
initialize failed, no sysfs interface will be created

Signed-off-by: default avatarXiao 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 65b3c07b
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -140,10 +140,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,
@@ -163,7 +160,7 @@ static int start_khugepaged(void)
	} else
		/* wakeup to exit */
		wake_up_interruptible(&khugepaged_wait);
out:

	return err;
}