summaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2012-10-08 16:29:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 16:22:25 +0900
commit637e3a27ec2c84f7ecd083fa6943da2f19eb5e9f (patch)
tree9a90ab8b0ec8c21360f1a0e82a7d6a368099f423 /mm/huge_memory.c
parent65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc (diff)
downloadblackbird-obmc-linux-637e3a27ec2c84f7ecd083fa6943da2f19eb5e9f.tar.gz
blackbird-obmc-linux-637e3a27ec2c84f7ecd083fa6943da2f19eb5e9f.zip
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: 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 860ea9127851..9833d8ecf38f 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -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;
}
OpenPOWER on IntegriCloud